From 68d9f6b85690aa6402a69a1bc748be7129f39ed1 Mon Sep 17 00:00:00 2001 From: chenzeping <ChenZeping02609@163.com> Date: 星期一, 12 四月 2021 17:42:12 +0800 Subject: [PATCH] 功能底图切换标注 --- src/conf/TDT.js | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 46 insertions(+), 2 deletions(-) diff --git a/src/conf/TDT.js b/src/conf/TDT.js index 6f0597f..5a02c16 100644 --- a/src/conf/TDT.js +++ b/src/conf/TDT.js @@ -1,7 +1,15 @@ // basemap涓绘満閰嶇疆 + const SINOPEC_GIS_HOST = 'http://10.246.132.249:8080' // 鍐呯綉澶╁湴鍥句富鏈哄湴鍧� const TIANDITU_GIS_HOST = 'http://t0.tianditu.gov.cn' // 鍏綉澶╁湴鍥句富鏈哄湴鍧� -const TIANDITU_GIS_TOKEN = '5d76218063082952d18b76da5005f490' // 澶囩敤tk: f1b72b5e7cb1175acddfa485f1bc9770 + +const mapTokenArray = ['5d76218063082952d18b76da5005f490', + 'f1b72b5e7cb1175acddfa485f1bc9770', + 'ac8bbce8119b337d75d4b06696f6186d', + '9bf834ce1ba3ba01c568147e9bfcab7c'] + +const TIANDITU_GIS_TOKEN = mapTokenArray[Math.floor(Math.random() * mapTokenArray.length)] // 澶囩敤tk: f1b72b5e7cb1175acddfa485f1bc9770 + const intranet = [ { code: 'tianditu_img', @@ -68,6 +76,42 @@ isLoadMapByToken: true, url: SINOPEC_GIS_HOST + '/OneMapServer/rest/services/base-tdt-label-vector/WMTS?' + 'layer=cva&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', + option: { + maxZoom: 18, + minZoom: 1, + zoomOffset: 1 + } + } + }, + { + code: 'tianditu_ter', + name: '涓煶鍖栧ぉ鍦板浘鍦板舰', + icon_actived: '/assets/images/map-pages/icon/terrain.png', + icon_deactived: '/assets/images/map-pages/icon/terrain.png', + isAddToMap: false, + annotationCheck: true, + map: { + layerName: '澶╁湴鍥惧叏鐞冨湴褰�', + type: 'wmts', + visible: false, + layerType: 'ter_c', + isLoadMapByToken: true, + url: SINOPEC_GIS_HOST + '/OneMapServer/rest/services/base-tdt-ter-globe/WMTS?' + + 'layer=vec&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', + option: { + maxZoom: 18, + minZoom: 1, + zoomOffset: 1 + } + }, + annotation: { + layerName: '澶╁湴鍥惧湴褰㈡敞璁�', + type: 'wmts', + visible: false, + layerType: 'cta_c', + isLoadMapByToken: true, + url: SINOPEC_GIS_HOST + '/OneMapServer/rest/services/base-tdt-label-ter/WMTS?' + + 'layer=cva&style=default&tilematrixset=c&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}', option: { maxZoom: 18, minZoom: 1, @@ -183,7 +227,7 @@ visible: false, layerType: 'cta_c', isLoadMapByToken: true, - url: TIANDITU_GIS_HOST + '/cta_c/wmts?layer=cva&style=default&tilematrixset=c' + + url: TIANDITU_GIS_HOST + '/cta_c/wmts?layer=cta&style=default&tilematrixset=c' + '&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}' + '&tk=' + TIANDITU_GIS_TOKEN, option: { -- Gitblit v1.8.0