# 底图管理

# 配置规范

// 这个文件描述底图管理微件配置信息
{
  // 底图列表
  "baseMapList": [
    {
      // 底图名称
      "name": "xxx",
      // 底图缩略图图片路径,可通过上传设置
      "image": "xxx",
      // 是否可见,设置为“true”,则会显示在管理界面上;设置为“false”,不会在界面上显示
      "visible": "true",
      // 是否被选择,设置为true,表示默认被选择,默认加载,软件初始化时,会将选中的底图在地图视图中显示;设置为false,表示默认不加载
      "select": false,
      // 描述
      "description": "",
      // 该底图下的数据列表
      "children": [
        {
          // 类型,二维:IGSTile、IGSMapImage、IGSVector、OGCWMS、OGCWMTS、ArcGISMapImage、ArcGISTile、VectorTile;三维:IGSScene、TILE3D、ModelCache、STKTerrain
          "type": "xxx",
          // url,值由commonData当中参数serverUrl配置得到
          "url": "xxx",
          // 名称
          "name": "xxx",
          // 可选,令牌key,默认值为token,可自定义,比如天地图是tk,值由commonData当中参数tokenKey配置得到
          "tokenKey": "xxx",
          // 可选,令牌value,值由commonData当中参数token配置得到
          "token": "xxx",
          // 描述
          "description": "",
          // 该子图层的配置参数
          "commonData":{
            // ip
            "ip": "xxx",
            // port
            "port": "xxx",
            // name
            "name": "xxx",
            // 图层类型
            "layerServiceType": "xxx",
            // url
            "serverUrl": "xxx",
            // 可选
            "tokenKey": "xxx",
            // 可选
            "token": "xxx",
          },
          // 服务类型,用于管理平台编辑回显
          "serviceType":[],
        }
        // xxx
      ],
      // guid 唯一标识符
      "guid": "ba4584cc-762d-4c7a-b92c-89848787ac67"
    },
    {
      // 底图名称
      "name": "xxx",
      // 底图缩略图图片路径,可通过上传设置
      "image": "xxx",
      // 是否可见,设置为“true”,则会显示在管理界面上;设置为“false”,不会在界面上显示
      "visible": "true",
      // 是否被选择,设置为true,表示默认被选择,默认加载,软件初始化时,会将选中的底图在地图视图中显示;设置为false,表示默认不加载
      "select": false,
       // 描述
      "description": "",
      // 该底图下的数据列表
      "children": [
        {
          // 类型,二维:IGSTile、IGSMapImage、IGSVector、OGCWMS、OGCWMTS、ArcGISMapImage、ArcGISTile、VectorTile;三维:IGSScene、TILE3D、ModelCache、STKTerrain
          "type": "xxx",
          // url,值由commonData当中参数serverUrl配置得到
          "url": "xxx",
          // 名称
          "name": "xxx",
          // 可选,令牌key,默认值为token,可自定义,比如天地图是tk,值由commonData当中参数tokenKey配置得到
          "tokenKey": "xxx",
          // 可选,令牌value,值由commonData当中参数token配置得到
          "token": "xxx",
          // 描述
          "description": "",
          // 该子图层的配置参数
          "commonData":{
            // ip
            "ip": "xxx",
            // port
            "port": "xxx",
            // name
            "name": "xxx",
            // 图层类型
            "layerServiceType": "xxx",
            // url
            "serverUrl": "xxx",
            // 可选
            "tokenKey": "xxx",
            // 可选
            "token": "xxx",
          },
          // 服务类型,用于管理平台编辑回显
          "serviceType":[],
        }
        // ...
      ],
      // guid 唯一标识符
      "guid": "790d84a0-8810-4f83-a895-1cfefebd84e2"
    }
    //...
  ],
  // 索引底图标识,与底图列表中其中一项的guid保持一致
  "indexBaseMapGUID": "ba4584cc-762d-4c7a-b92c-89848787ac67",
  // 设置是否为单底图模式
  "isSingleMode": false,
  // 设置是否显示底图
   "isShow": true
}

# 支持的数据类型

数据类型 数据类型描述 用到的参数 地图模式
OGCWMS OGC WMS 服务 type、url、name、tokenKey(可选)、token(可选)、description、commonData、serviceType 2D、3D
OGCWMTS OGC WMTS 服务 type、url、name、tokenKey(可选)、token(可选)、description、commonData、serviceType 2D、3D
ArcGISTile ArcGIS 瓦片服务 type、url、name、tokenKey(可选)、token(可选)、description、commonData、serviceType 2D、3D
ArcGISMapImage ArcGIS 地图服务 type、url、name、tokenKey(可选)、token(可选)、description、commonData、serviceType 2D、3D
IGSTile MapGIS 瓦片服务 type、url、name、tokenKey(可选)、token(可选)、description、commonData、serviceType 2D、3D
IGSMapImage MapGIS 地图服务 type、url、name、tokenKey(可选)、token(可选)、description、commonData、serviceType 2D、3D
IGSVector MapGIS 图层地图服务 type、url、name、tokenKey(可选)、token(可选)、description、commonData、serviceType 2D、3D
VectorTile 矢量瓦片 type、url、name 2D、3D
IGSScene MapGIS 场景服务 type、url、name、description、commonData、serviceType 3D
TILE3D 3DTiles服务 type、url、name、description、commonData、serviceType 3D
ModelCache MapGIS M3D模型缓存服务 type、url、name、description、commonData、serviceType 3D
STKTerrain STK地形 type、url、name、description、commonData、serviceType 3D

# 默认配置

{
  "baseMapList": [
    {
      "name": "天地图影像",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": true,
      "children": [
        {
          "name": "天地图影像底图",
          "description": "",
          "url": "http://t0.tianditu.gov.cn/img_c/wmts",
          "type": "OGCWMTS",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "OGCWMTS",
            "serverUrl": "http://t0.tianditu.gov.cn/img_c/wmts",
            "tokenKey": "tk",
            "token": "2ddaabf906d4b5418aed0078e1657029",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "OGCWMTS"
          ],
          "token": "2ddaabf906d4b5418aed0078e1657029",
          "tokenKey": "tk"
        },
        {
          "name": "天地图影像注记",
          "description": "",
          "url": "http://t0.tianditu.gov.cn/cia_c/wmts",
          "type": "OGCWMTS",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "OGCWMTS",
            "serverUrl": "http://t0.tianditu.gov.cn/cia_c/wmts",
            "tokenKey": "tk",
            "token": "2ddaabf906d4b5418aed0078e1657029",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "OGCWMTS"
          ],
          "token": "2ddaabf906d4b5418aed0078e1657029",
          "tokenKey": "tk"
        }
      ],
      "guid": "e54121e8-2a3a-454f-80ce-196dd73e789e"
    },
    {
      "name": "天地图矢量",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": true,
      "children": [
        {
          "name": "天地图矢量底图",
          "description": "",
          "url": "http://t0.tianditu.gov.cn/vec_c/wmts",
          "type": "OGCWMTS",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "OGCWMTS",
            "serverUrl": "http://t0.tianditu.gov.cn/vec_c/wmts",
            "tokenKey": "tk",
            "token": "2ddaabf906d4b5418aed0078e1657029",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "OGCWMTS"
          ],
          "token": "2ddaabf906d4b5418aed0078e1657029",
          "tokenKey": "tk"
        },
        {
          "name": "天地图矢量注记",
          "description": "",
          "url": "http://t0.tianditu.gov.cn/cva_c/wmts",
          "type": "OGCWMTS",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "OGCWMTS",
            "serverUrl": "http://t0.tianditu.gov.cn/cva_c/wmts",
            "tokenKey": "tk",
            "token": "2ddaabf906d4b5418aed0078e1657029",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "OGCWMTS"
          ],
          "token": "2ddaabf906d4b5418aed0078e1657029",
          "tokenKey": "tk"
        }
      ],
      "guid": "99aade2c-60fd-4baa-9c2b-8c6e15e61917"
    },
    {
      "name": "天地图地形",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": true,
      "children": [
        {
          "name": "天地图地形晕渲",
          "description": "",
          "url": "http://t0.tianditu.gov.cn/ter_c/wmts",
          "type": "OGCWMTS",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "OGCWMTS",
            "serverUrl": "http://t0.tianditu.gov.cn/ter_c/wmts",
            "tokenKey": "tk",
            "token": "2ddaabf906d4b5418aed0078e1657029",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "OGCWMTS"
          ],
          "token": "2ddaabf906d4b5418aed0078e1657029",
          "tokenKey": "tk"
        },
        {
          "name": "天地图地形注记",
          "description": "",
          "url": "http://t0.tianditu.gov.cn/cta_c/wmts",
          "type": "OGCWMTS",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "OGCWMTS",
            "serverUrl": "http://t0.tianditu.gov.cn/cta_c/wmts",
            "tokenKey": "tk",
            "token": "2ddaabf906d4b5418aed0078e1657029",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "OGCWMTS"
          ],
          "token": "2ddaabf906d4b5418aed0078e1657029",
          "tokenKey": "tk"
        }
      ],
      "guid": "78881d5b-1d36-468f-a7c3-96752aca07e4"
    },
    {
      "name": "天地图影像2",
      "image": "/upload/basemap-tianditu-img.png",
      "visible": "true",
      "select": false,
      "children": [
        {
          "serverType": "tdt",
          "layerType": "Zondy.Enum.Map.TiandituType.IMG",
          "projection": "ol.proj.get('EPSG:4326')",
          "layerName": "天地图影像底图"
        },
        {
          "serverType": "tdt",
          "layerType": "Zondy.Enum.Map.TiandituType.CIA",
          "projection": "ol.proj.get('EPSG:4326')",
          "layerName": "天地图影像注记"
        }
      ],
      "guid": "0480d876-446b-4cb2-b593-0f9320df860d"
    },
    {
      "name": "天地图矢量2",
      "image": "/upload/basemap-tianditu-vec.png",
      "visible": "true",
      "select": false,
      "children": [
        {
          "serverType": "tdt",
          "layerType": "Zondy.Enum.Map.TiandituType.VEC",
          "projection": "ol.proj.get('EPSG:4326')",
          "layerName": "天地图矢量底图"
        },
        {
          "serverType": "tdt",
          "layerType": "Zondy.Enum.Map.TiandituType.CVA",
          "projection": "ol.proj.get('EPSG:4326')",
          "layerName": "天地图矢量注记"
        }
      ],
      "guid": "06ab2882-b27d-41fb-be73-815a0a5cdc8d"
    },
    {
      "name": "ArcGIS影像图",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": false,
      "children": [
        {
          "name": "Imagery",
          "description": "",
          "url": "http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer",
          "type": "ArcGISTile",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "ArcGISTile",
            "serverUrl": "http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer",
            "tokenKey": "",
            "token": "",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "ArcGISTile"
          ]
        }
      ],
      "guid": "3dd19f26-3034-4c0b-a633-2160329849b5"
    },
    {
      "name": "ArcGIS街道图",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": false,
      "children": [
        {
          "name": "Streets",
          "description": "",
          "url": "http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer",
          "type": "ArcGISTile",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "ArcGISTile",
            "serverUrl": "http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer",
            "tokenKey": "",
            "token": "",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "ArcGISTile"
          ]
        }
      ],
      "guid": "c321198d-e2d3-45db-a31b-759042264476"
    },
    {
      "name": "ArcGIS影像图2",
      "image": "/upload/basemap-arcgis-img.jpg",
      "visible": "true",
      "select": false,
      "children": [
        {
          "serverType": "arcgis",
          "layerType": "Zondy.Enum.Map.ArcGISLayerType.ImageryWorld2D",
          "layerName": "Imagery"
        }
      ],
      "guid": "70b687a9-d343-4912-997c-ca96eb004a35"
    },
    {
      "name": "ArcGIS街道图2",
      "image": "/upload/basemap-arcgis-street.jpg",
      "visible": "true",
      "select": false,
      "children": [
        {
          "serverType": "arcgis",
          "layerType": "Zondy.Enum.Map.ArcGISLayerType.StreetMapWorld2D",
          "layerName": "Streets"
        }
      ],
      "guid": "a18e743c-32b5-453d-ac5d-8c9433b50784"
    },
    {
      "name": "MapGIS文档",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": false,
      "children": [
        {
          "name": "MapGIS文档",
          "description": "",
          "url": "http://192.168.21.191:6163/igs/rest/mrms/docs/Hubei4326",
          "type": "IGSMapImage",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "IGSMapImage",
            "serverUrl": "http://192.168.21.191:6163/igs/rest/mrms/docs/Hubei4326",
            "tokenKey": "",
            "token": "",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "IGSMapImage"
          ]
        }
      ],
      "guid": "aa8d7df3-ada0-459f-9b78-239ee1b93711"
    },
    {
      "name": "MapGIS瓦片",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": false,
      "children": [
        {
          "name": "MapGIS瓦片",
          "description": "",
          "url": "http://192.168.21.191:6163/igs/rest/mrms/tile/DEM250",
          "type": "IGSTile",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "IGSTile",
            "serverUrl": "http://192.168.21.191:6163/igs/rest/mrms/tile/DEM250",
            "tokenKey": "",
            "token": "",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "IGSTile"
          ]
        }
      ],
      "guid": "9864270c-3a09-445c-85f3-2f5013b56959"
    },
    {
      "name": "MapGIS图层",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": false,
      "children": [
        {
          "name": "MapGIS图层",
          "description": "",
          "url": "http://192.168.21.191:6163/igs/rest/mrms/layers?gdbps=gdbp://MapGisLocal/专题图数据/sfcls/中国地级市x",
          "type": "IGSVector",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "IGSVector",
            "serverUrl": "http://192.168.21.191:6163/igs/rest/mrms/layers?gdbps=gdbp://MapGisLocal/专题图数据/sfcls/中国地级市x",
            "tokenKey": "",
            "token": "",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "IGSVector"
          ]
        }
      ],
      "guid": "2cb4b8eb-45b1-41ea-a321-7ca80949beae"
    },
    {
      "name": "OGCWMS",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": false,
      "children": [
        {
          "name": "OGCWMS",
          "description": "",
          "url": "http://192.168.21.191:6163/igs/rest/ogc/doc/北京市0630_hdf/WMSServer",
          "type": "OGCWMS",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "OGCWMS",
            "serverUrl": "http://192.168.21.191:6163/igs/rest/ogc/doc/北京市0630_hdf/WMSServer",
            "tokenKey": "",
            "token": "",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "OGCWMS"
          ]
        }
      ],
      "guid": "611b6335-5bc1-4c13-ba77-7115d884f537"
    },
    {
      "name": "OGCWMTS",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": false,
      "children": [
        {
          "name": "OGCWMTS",
          "description": "",
          "url": "http://t0.tianditu.gov.cn/vec_c/wmts",
          "type": "OGCWMTS",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "OGCWMTS",
            "serverUrl": "http://t0.tianditu.gov.cn/vec_c/wmts",
            "tokenKey": "tk",
            "token": "2ddaabf906d4b5418aed0078e1657029",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "OGCWMTS"
          ],
          "token": "2ddaabf906d4b5418aed0078e1657029",
          "tokenKey": "tk"
        }
      ],
      "guid": "c19fb42b-fb9b-4455-b5a5-437cb0f9d9bc"
    },
    {
      "name": "ArcGIS文档",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": false,
      "children": [
        {
          "name": "ArcGIS文档",
          "description": "",
          "url": "http://219.142.81.85/arcgis/rest/services/MAS12P51000011/MapServer",
          "type": "ArcGISMapImage",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "ArcGISMapImage",
            "serverUrl": "http://219.142.81.85/arcgis/rest/services/MAS12P51000011/MapServer",
            "tokenKey": "",
            "token": "",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "ArcGISMapImage"
          ]
        }
      ],
      "guid": "48172cf3-ea34-4ec2-acc5-249890031f23"
    },
    {
      "name": "ArcGIS瓦片",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": false,
      "children": [
        {
          "name": "ArcGIS瓦片",
          "description": "",
          "url": "http://219.142.81.85/arcgis/rest/services/20wanZL/MapServer",
          "type": "ArcGISTile",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "ArcGISTile",
            "serverUrl": "http://219.142.81.85/arcgis/rest/services/20wanZL/MapServer",
            "tokenKey": "",
            "token": "",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "ArcGISTile"
          ]
        }
      ],
      "guid": "483e9096-9125-4856-9148-093eb5c996d2"
    },
    {
      "name": "矢量瓦片",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": false,
      "children": [
        {
          "name": "矢量瓦片",
          "description": "",
          "url": "http://192.168.21.191:6163/igs/rest/mrms/vtiles/styles/OSM全中国经纬度.json",
          "type": "VectorTile",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "VectorTile",
            "serverUrl": "http://192.168.21.191:6163/igs/rest/mrms/vtiles/styles/OSM全中国经纬度.json",
            "tokenKey": "",
            "token": "",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "VectorTile"
          ]
        }
      ],
      "guid": "2ebf4c13-4198-4829-aa59-b4e6570cf7e1"
    },
    {
      "name": "索引底图",
      "description": "",
      "image": "/file/default/basemap.png",
      "visible": "true",
      "select": true,
      "children": [
        {
          "name": "北京市",
          "description": "索引底图",
          "url": "http://192.168.21.191:6163/igs/rest/mrms/tile/北京市",
          "type": "IGSTile",
          "commonData": {
            "ip": "",
            "port": "",
            "name": "",
            "layerServiceType": "IGSTile",
            "serverUrl": "http://192.168.21.191:6163/igs/rest/mrms/tile/北京市",
            "tokenKey": "",
            "token": "",
            "wfsUrl": "",
            "extent": ""
          },
          "serviceType": [
            "server",
            "IGSTile"
          ]
        }
      ],
      "guid": "5dbb6735-f969-4a4e-a282-c36e5a376dfa"
    }
  ],
  "indexBaseMapGUID": "5dbb6735-f969-4a4e-a282-c36e5a376dfa",
  "isSingleMode": false,
  "isShow": true
}