From c56e506fd34c58209240e97fc29043639fae5d19 Mon Sep 17 00:00:00 2001 From: ChenZeping <chenzeping> Date: 星期四, 29 四月 2021 15:13:21 +0800 Subject: [PATCH] 统计表,指标,预报警表格弹框公共修改,管线分析功能 --- src/Sgis.js | 34 ++++++++++++---------------------- 1 files changed, 12 insertions(+), 22 deletions(-) diff --git a/src/Sgis.js b/src/Sgis.js index 6e794e0..d74d329 100644 --- a/src/Sgis.js +++ b/src/Sgis.js @@ -1,12 +1,7 @@ -import BasemapHelper from '@components/helpers/BasemapHelper' -import VectorLayerHelper from '@components/helpers/VectorLayerHelper' // 鍒濆鍖栨樉绀� -import ServiceLayerHelper from '@components/helpers/ServiceLayerHelper' - -import '@components/plugin/PathDrag' -import MapConfig from '@/conf/MapConfig' +import MapConfig from './conf/MapConfig' import '@components/plugin/PathDashFlow' // 娴佸姩绾垮浘 -import DownLoad from '@components/plugin/DownLoad' +import DownLoad from './components/plugin/DownLoad' // 娴嬮噺 import '@components/plugin/leaflet-measure-path/leaflet-measure-path' @@ -19,25 +14,28 @@ import '@/components/plugin/magicMarker.css' import '@components/plugin/pulse/Pulse' // marker 澶栧湀娉� import '@components/plugin/pulse/Pulse.css' // marker 澶栧湀娉� css +import BasemapHelper from './components/helpers/BasemapHelper' +import VectorLayerHelper from './components/helpers/VectorLayerHelper' +// import eventBus from './eventBus' let map = null const L = window.L -const initMap = (div) => { +const initMap = (div, mapOption) => { if (map != null) { map.remove() } DownLoad.init(L) - - map = L.map(div, MapConfig.mapOptions) + const option = mapOption || MapConfig.mapOptions + map = L.map(div, option) map.on('click', (event, a, b) => { console.log(event, a, b) }) + // eventBus.$emit('map-obj', map) + window.map = map window.L = L - - initTileLayersHelper(map) return map } @@ -49,17 +47,10 @@ */ const initBasemapsHelper = (map) => { // todo 杩欓噷杩涜搴曞浘鍦板浘鐨勫垵濮嬪寲 + console.log(map) return new BasemapHelper({ map }) } -/** - * 涓氬姟搴曞浘鍒濆鍖� - * @param map - * @param L - */ -const initTileLayersHelper = (map) => { - var serviceLayerHelper = new ServiceLayerHelper({ map }) - return serviceLayerHelper -} + /** * 鐭㈤噺鍦板浘鍒濆鍖� * @param map @@ -74,6 +65,5 @@ export default { initMap, initBasemapsHelper, - initTileLayersHelper, initVectorLayersHelper } -- Gitblit v1.8.0