| | |
| | | // 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: 'sinopec_img', |
| | | code: 'tianditu_img', |
| | | name: '中石化天地图影像', |
| | | icon_actived: '/assets/images/map-pages/icon/img.png', |
| | | icon_deactived: '/assets/images/map-pages/icon/img.png', |
| | |
| | | } |
| | | }, |
| | | { |
| | | code: 'sinopec_vec', |
| | | code: 'tianditu_vec', |
| | | name: '中石化天地图矢量', |
| | | icon_actived: '/assets/images/map-pages/icon/road.png', |
| | | icon_deactived: '/assets/images/map-pages/icon/road.png', |
| | |
| | | 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, |
| | |
| | | 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, |
| | | annotationCheck: true, |
| | | url: TIANDITU_GIS_HOST + '/ter_c/wmts?layer=ter&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: { |
| | | maxZoom: 18, |
| | | minZoom: 1, |
| | | zoomOffset: 1 |
| | | } |
| | | }, |
| | | annotation: { |
| | | layerName: '天地图地形标记', |
| | | type: 'wmts', |
| | | visible: false, |
| | | layerType: 'cta_c', |
| | | isLoadMapByToken: true, |
| | | 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: { |
| | | maxZoom: 18, |
| | | minZoom: 1, |
| | | zoomOffset: 1 |
| | | } |
| | | } |
| | | } |
| | | ] |
| | | export default |