// 系统文件配置 const host = location.host; const web = host.indexOf('/web') > -1 ? '/web' : ''; const iisHost = host + web; var webHost = 'http://117.131.137.5:5009/'; // 请求token const tokenUrl = location.href; const paramsStr = location.search; const params = new URLSearchParams(paramsStr); const token = params.get('token'); const config = { apiUrl: webHost, apiLength: 16, jsonUrl: 'http://' + host, imgUrl: 'http://' + host + web + '/data/img/', tokenApi: 'http://117.131.137.5:8580/', // 默认底图 mapServer: { url: 'https://rt0.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid=4&scene=0', type: 'qqmap', tdMapUrl: 'https://t0.tianditu.gov.cn/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=3ec79cf7a9dcc6bb18411a5414b148cb', DTUrl: webHost + '/igs/rest/ogc/WMTSServer?service=WMTS&layer=全球影像地图瓦片1-14级&version=1.0.0&style=&TileMatrixSet=EPSG:4490_全球影像地图瓦片1-14级_028mm_GB&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&format=image/png&request=GetTile' }, // 系统初始化定位 location: { x: 117.256817, y: 39.114061, z: 20000 }, posHeight: 1000, // icon 设置distanceDisplayCondition最大显示距离 distance: 5000, token: token, // 登录地址 tokenUrl: tokenUrl, // 显示范围 extend: { minx: 117.15820312041319, miny: 39.023437500786855, maxx: 117.33398437041132, maxy: 39.19921875078414 } };