美文网首页地图瓦片
Mobile Atlas Creator配置天地图数据源并下载离

Mobile Atlas Creator配置天地图数据源并下载离

作者: 颜墨痕 | 来源:发表于2019-05-07 10:50 被阅读0次

流程整理

操作流程

1. 配置文件信息

框架梳理:

  • customMultiLayerMapSource:配置多层数据源标签;
  • name:地图册名称;
  • customMapSource:单个地图册标签;
  • 核心在url配置上:
    http://t4.tianditu.com/DataServer?T=vec_w&x={$x}&y={$y}&l={$z}&tk=官网申请的秘钥
    ①天地图底图:http://t4.tianditu.com/DataServer?T=vec_w
    ②&:xml中用来表示&号;
    ③x={$x}:用来代表瓦片的行列号;

完整文件:

<?xml version="1.0" encoding="UTF-8"?>
<customMultiLayerMapSource>
  <name>TianDiTu Map</name>
  <tileType>PNG</tileType>
  <backgroundColor>#000000</backgroundColor>
  <layers>
    <customMapSource>
        <name>TianDiTu Base Map</name>
        <minZoom>0</minZoom>
        <maxZoom>20</maxZoom>
        <tileType>PNG</tileType>
        <tileUpdate>None</tileUpdate>
        <ignoreErrors>true</ignoreErrors>
        <url>http://t4.tianditu.com/DataServer?T=vec_w&amp;x={$x}&amp;y={$y}&amp;l={$z}&amp;tk=官网申请的秘钥</url>
    </customMapSource>
    <customMapSource>
      <name>TianDiTu Note</name>
      <minZoom>0</minZoom>
      <maxZoom>20</maxZoom>
      <tileType>PNG</tileType>
      <tileUpdate>None</tileUpdate>
      <ignoreErrors>true</ignoreErrors>
      <url>http://t4.tianditu.com/DataServer?T=cva_w&amp;x={$x}&amp;y={$y}&amp;l={$z}&amp;tk=官网申请的秘钥</url>
    </customMapSource>
  </layers>
</customMultiLayerMapSource>

2. 操作步骤

2.1 将上述配置文件存储成TianDiTuMap.xml

将TianDiTu.xml放置到Mobile Atlas Creator安装路径的..\mapsources路径底下


路径移动

2.2 重新启动Mobile Atlas Creator

选择OSMTracker tile storage,这样下载出来的瓦片行列号可以与前端调用相对应。具体可以根据实际需要修改下载文件类型。


选择OSMTracker tile storage

具体操作如下图:

  1. 找到配置的天地图数据源;
  2. 定位到所需要下载的区域,并框选;
  3. 勾选所需要下载的比例尺层级;
  4. 将勾选的区域添加到下载册里;
  5. 点击开始下载按钮即可。
操作步骤截图

最终下载的文件默认在安装目录的..\atlases路径底下,直接去找即可。(也可以自己在设置里面配置)

相关文章

网友评论

    本文标题:Mobile Atlas Creator配置天地图数据源并下载离

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