本文参考网址:http://bbs.8264.com/thread-1629188-1-1.html
http://www.doyouhike.net/forum/comm_nav/936233,0,0,0.html
作者苦于离线地图的数据源多日,试过非常多的地图抓取软件,大多数不是要注册就是下载的不完整,也曾试过下载Openstreetmap的数据,但是要整体下载,实在是耗时耗力。
终于,作者找到了这个免费好用的离线地图制作软件:Mobile Atlas Creator 。MOBAC是真正的全免费、开源、全平台支持的超强离线地图制作利器。
地图加加开发团队为大家带来了Mobile Atlas Creator 的多语言版本(支持简体中文、繁体中文和英文的自由切换),此版本基于最新的 MOBAC 1.9.13 源代码,对其中600多条英文语句进行了翻译、并修复MOBAC在显示高清地图(512x512图片)时的问题,还增加OSX系统双击启动命令(start.jar)
下载地址:http://pan.baidu.com/share/link?shareid=507619&uk=4144671628(如果有大写,请改成小写)
Mobile Atlas Creator在1.9版后改版了,官方取消了很多地图资源(包括Google Maps和Google Ditu)
但是,该版本提供了自定义,也就是你只要能提供各个地图图源的地址(貌似都是通用标准的),就可以“挂”上去,可以任意抓取后制作离线地图(虽然OruxMaps手机版也可以抓离线了,但是速度很慢,而且会丢失瓦片残缺好像..)
最开始我也不知道,是Google到对岸的帖子发现,原帖地址http://tomliu888.blogspot.com/2012/09/mobile-atlas-creator.html感谢原作者(需要fan-qiang),这里分享一下。
原理其实就是利用工具检测浏览器缓存,去拿到你正在浏览的在线地图的url,然后“拼装”成符合Mobile Atlas Creator的配置文件,这样就可以抓取你添加的离线地图了...
用chromecacheview查看图源地址
看到Google Ditu的地址为
http://mt0.google.cn/vt/lyrs=m@207000000&hl=zh-CN&gl=CN&src=app&x=416&y=222&z=9&s=Galile
"封装"成Mobile Atlas Creator的格式
http://mt0.google.cn/vt/lyrs=m@207000000&hl=zh-CN&gl=CN&src=app&x={$x}&y={$y}&z={$z}&s=Galile
所有的"&"替换成"&",x、y、z的坐标数据部分替换成{$x}、{$y}、{$z}
其他地图图源照此类推
按照官方格式保存成xxx.xml放到Mobile Atlas Creator的mapsources下就可以
官方格式
<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
<name>google maps cn</name>
<minZoom>0</minZoom>
<maxZoom>19</maxZoom>
<tileType>png</tileType>
<tileUpdate>None</tileUpdate>
<url>http://你修改好的图源地址</url>
<backgroundColor>#000000</backgroundColor>
</customMapSource>
附上弄好的地图配置文件,分别保存成xml文件,放到mapsources下就行
Google卫星可以到20级,但Google地形只有14级的图源,可惜了...
(如果在卫星和地形间连续抓取的话,记得清除一下浏览器缓存,不然会读取浏览器缓存里的同位置图源,也就是可能你选了卫星,但抓出来的是地形..)
Google地图
-----------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
<name>Google Ditu</name>
<minZoom>0</minZoom>
<maxZoom>18</maxZoom>
<tileType>png</tileType>
<tileUpdate>None</tileUpdate>
<url> http://mt0.google.cn/vt/lyrs=m @207000000&hl=zh-CN&gl=CN&src=app&x={$x}&y={$y}&z={$z}&s=Galile</url>
<backgroundColor>#000000</backgroundColor>
</customMapSource>
-----------------------------------------------------------------------------------
Google卫星+地名
-----------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customMultiLayerMapSource>
<name>Google 卫星</name>
<tileType>PNG</tileType>
<layers>
<customMapSource>
<name>Google 卫星图</name>
<minZoom>0</minZoom>
<maxZoom>20</maxZoom>
<tileType>PNG</tileType>
<tileUpdate>None</tileUpdate>
<url> http://mt0.google.cn/vt/lyrs=s @124&hl=zh-CN&gl=CN&src=app&x={$x}&s=&y={$y}&z={$z}&s=Galileo</url>
<backgroundColor>#000000</backgroundColor>
</customMapSource>
<customMapSource>
<name>Google 地名图</name>
<minZoom>0</minZoom>
<maxZoom>20</maxZoom>
<tileType>PNG</tileType>
<tileUpdate>None</tileUpdate>
<url> http://mt0.google.cn/vt/imgtp=png32&lyrs=h @207000000&hl=zh-CN&gl=CN&src=app&x={$x}&y={$y}&z={$z}&s=Galil</url>
</customMapSource>
</layers>
</customMultiLayerMapSource>
-----------------------------------------------------------------------------------
Google地形+地名
-----------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customMultiLayerMapSource>
<name>Google 地形</name>
<tileType>PNG</tileType>
<layers>
<customMapSource>
<name>Google 地形图</name>
<minZoom>0</minZoom>
<maxZoom>14</maxZoom>
<tileType>PNG</tileType>
<tileUpdate>None</tileUpdate>
<url> http://mt3.google.cn/vt/lyrs=t @130,r@207000000&hl=zh-CN&gl=CN&src=app&expIds=201363&x={$x}&s=&y={$y}&z={$z}&s=Galil</url>
<backgroundColor>#000000</backgroundColor>
</customMapSource>
<customMapSource>
<name>Google 地名图</name>
<minZoom>0</minZoom>
<maxZoom>20</maxZoom>
<tileType>PNG</tileType>
<tileUpdate>None</tileUpdate>
<url> http://mt0.google.cn/vt/imgtp=png32&lyrs=h @207000000&hl=zh-CN&gl=CN&src=app&x={$x}&y={$y}&z={$z}&s=Galil</url>
</customMapSource>
</layers>
</customMultiLayerMapSource>
-----------------------------------------------------------------------------------
MapABC
-----------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
<name>MAPABC</name>
<minZoom>0</minZoom>
<maxZoom>18</maxZoom>
<tileType>png</tileType>
<tileUpdate>None</tileUpdate>
<url>http://webrd03.is.autonavi.com/appmaptile?x={$x}&y={$y}&z={$z}&lang=zh_cn&size=1&scale=1&style=7</url>
<backgroundColor>#000000</backgroundColor>
</customMapSource>
-----------------------------------------------------------------------------------
原帖作者抓的Nokia地图图源
-----------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
<name>Nokia Here Map</name>
<minZoom>0</minZoom>
<maxZoom>20</maxZoom>
<tileType>png</tileType>
<tileUpdate>IfNoneMatch</tileUpdate>
<url>http://1.maps.nlp.nokia.com/maptile/2.1/maptile/b9e8949142/normal.day/{$z}/{$x}/{$y}/256/png8?app_id=SqE1xcSngCd3m4a1zEGb&token=r0sR1DzqDkS6sDnh902FWQ&lg=CHI</url>
<backgroundColor>#000000</backgroundColor>
</customMapSource>
-----------------------------------------------------------------------------------
————————————————
版权声明:本文为CSDN博主「安可辰」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/ankechen/article/details/9024165
联系客服