From f9f80893f6b29f0aaa8d5f7c1291f91b8f477fe4 Mon Sep 17 00:00:00 2001 From: ChenZeping02609 <chenzeping02609@163.com> Date: 星期三, 12 五月 2021 18:21:01 +0800 Subject: [PATCH] 污染源修改 --- src/Sgis.js | 20 +++++++++----------- 1 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/Sgis.js b/src/Sgis.js index 6682108..64977a5 100644 --- a/src/Sgis.js +++ b/src/Sgis.js @@ -1,10 +1,7 @@ -import BasemapHelper from '@components/helpers/BasemapHelper' -import VectorLayerHelper from '@components/helpers/VectorLayerHelper' // 鍒濆鍖栨樉绀� -// 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' @@ -17,20 +14,21 @@ 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) + const option = mapOption || MapConfig.mapOptions + map = L.map(div, option) - map = L.map(div, MapConfig.mapOptions) - - map.on('click', (event, a, b) => { - console.log(event, a, b) - }) + // eventBus.$emit('map-obj', map) window.map = map window.L = L -- Gitblit v1.8.0