From 48d575a147ecf5b5ea042dc38d99ed58df68ddfd Mon Sep 17 00:00:00 2001 From: YANGDL <114714267@qq.com> Date: 星期五, 15 一月 2021 18:02:53 +0800 Subject: [PATCH] 增加mapbox插接件和功能 --- src/conf/MapConfig.js | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/conf/MapConfig.js b/src/conf/MapConfig.js index f08b037..8cd7617 100644 --- a/src/conf/MapConfig.js +++ b/src/conf/MapConfig.js @@ -12,23 +12,23 @@ // service涓绘満閰嶇疆 const APP_GIS_HOST = 'http://xearth.cn:6299' -const APP_GIS_HOST_PIPELINE = 'http://xearth.cn:6288' +const APP_GIS_HOST_PIPELINE = 'http://xearth.cn:6289' // 鑷畾涔変富鏈洪厤缃� const BLUEMAP_HOST = APP_GIS_HOST // 鍏徃鍙戝竷鐨勫湴鍥炬湇鍔★紝鐢ㄤ簬娴嬭瘯鐨勫湴鍧� // 鍑犱綍绫诲瀷甯搁噺 const GEOM_POINT = 'POINT' -const GEOM_POLYLINE = 'POLYLINE' -const GEOM_POLYGON = 'POLYGON' -console.log(GEOM_POINT, GEOM_POLYLINE, GEOM_POLYGON) +// const GEOM_POLYLINE = 'POLYLINE' +// const GEOM_POLYGON = 'POLYGON' const mapOptions = { crs: L.CRS.EPSG4326, minZoom: 3, maxZoom: 18, - center: [26, 104], - zoom: 3, + // center: [26, 104], + center: [32.224016189575195, 118.77070426940918], + zoom: 14, worldCopyJump: true, inertia: true, zoomControl: false, @@ -46,6 +46,7 @@ icon_actived: '/assets/images/map-pages/icon/img.png', icon_deactived: '/assets/images/map-pages/icon/img.png', isAddToMap: true, + annotationCheck: true, map: { layerName: '澶╁湴鍥惧奖鍍忓湴鍥�', type: 'wmts', @@ -81,6 +82,7 @@ icon_actived: '/assets/images/map-pages/icon/road.png', icon_deactived: '/assets/images/map-pages/icon/road.png', isAddToMap: false, + annotationCheck: true, map: { layerName: '澶╁湴鍥剧煝閲忓湴鍥�', type: 'wmts', @@ -118,6 +120,7 @@ icon_actived: '/assets/images/map-pages/icon/img.png', icon_deactived: '/assets/images/map-pages/icon/img.png', isAddToMap: true, + annotationCheck: true, map: { layerName: '澶╁湴鍥惧奖鍍忓湴鍥�', type: 'wmts', @@ -151,16 +154,18 @@ }, { code: 'tianditu_vec', - name: '澶╁湴鍥惧奖鍍�', + name: '澶╁湴鍥剧煝閲�', icon_actived: '/assets/images/map-pages/icon/road.png', icon_deactived: '/assets/images/map-pages/icon/road.png', isAddToMap: false, + annotationCheck: true, map: { layerName: '澶╁湴鍥剧煝閲忓湴鍥�', type: 'wmts', visible: false, layerType: 'vec_c', isLoadMapByToken: true, + annotationCheck: true, url: TIANDITU_GIS_HOST + '/vec_c/wmts?layer=vec&style=default&tilematrixset=c' + '&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}' + '&tk=' + TIANDITU_GIS_TOKEN, @@ -218,7 +223,8 @@ icon_actived: '', icon_deactived: '', type: 'wms', - url: APP_GIS_HOST_PIPELINE + '/server/ogcserver/PipeLineTest/wms?version=1.1.1', + // url: APP_GIS_HOST_PIPELINE + '/server/ogcserver/PipeLineTest/wms?version=1.1.1', + url: APP_GIS_HOST_PIPELINE + '/server/ogcserver/PipeLine/wms?version=1.1.1', inLegend: true, checked: true, option: { @@ -227,6 +233,7 @@ format: 'image/png', // WMS image format (use 'image/png' for layers with transparency). transparent: true, // If true, the WMS service will return images with transparency. version: '1.1.1', // Version of the WMS service to use + tileSize: L.point(1024, 1024), crs: L.CRS.EPSG4326, // Coordinate Reference System to use for the WMS requests, defaults to map CRS. Don't change this if you're not sure what it means. uppercase: false }, -- Gitblit v1.8.0