美文网首页
A4纸分页下载城市百度地图

A4纸分页下载城市百度地图

作者: 超哥__ | 来源:发表于2021-01-08 23:10 被阅读0次
import math
url = "wget -O test%d%d.png \"http://api.map.baidu.com/staticimage/v2?ak=TyeVKKbcOMcOML13kX6rTFrK&center=%.2f,%.2f&zoom=14&width=780&height=1024\""
left    = 108.75
right   = 109.14
top     = 34.40
bottom  = 34.16
stepx   = 0.11
stepy   = 0.12

ch = int(math.ceil((right - left) / stepx))
cv = int(math.ceil((top - bottom) / stepy))
for i in range(cv):
    for j in range(ch):
        cmd = url % (i, j, left + j * stepx, top - i * stepy)
        print(cmd)

#wget -O test.png "http://api.map.baidu.com/staticimage/v2?ak=TyeVKKbcOMcOML13kX6rTFrK&center=108.75,34.40&zoom=14&width=580&height=760"
#wget -O test1.png "http://api.map.baidu.com/staticimage/v2?ak=TyeVKKbcOMcOML13kX6rTFrK&center=108.83,34.40&zoom=14&width=580&height=760"
#wget -O test2.png "http://api.map.baidu.com/staticimage/v2?ak=TyeVKKbcOMcOML13kX6rTFrK&center=108.75,34.31&zoom=14&width=580&height=760"
#108.75,34.40  -> 109.14,34.16      delx = 0.08 dely = 0.0

相关文章

网友评论

      本文标题:A4纸分页下载城市百度地图

      本文链接:https://www.haomeiwen.com/subject/euyqaktx.html