From 704714d2bbb1cf97cb16d452332c4334bc78a24c Mon Sep 17 00:00:00 2001
From: 徐旺旺 <11530253@qq.com>
Date: 星期二, 20 四月 2021 18:43:24 +0800
Subject: [PATCH] 加排口, 比例尺显示隐藏有BUG,暂时注释

---
 src/Sgis.js |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/Sgis.js b/src/Sgis.js
index 6682108..fda9cf2 100644
--- a/src/Sgis.js
+++ b/src/Sgis.js
@@ -1,7 +1,4 @@
-import BasemapHelper from '@components/helpers/BasemapHelper'
-import VectorLayerHelper from '@components/helpers/VectorLayerHelper'
 // 鍒濆鍖栨樉绀�
-// import '@components/plugin/PathDrag'
 import MapConfig from '@/conf/MapConfig'
 import '@components/plugin/PathDashFlow' // 娴佸姩绾垮浘
 import DownLoad from '@components/plugin/DownLoad'
@@ -17,21 +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'
+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
 

--
Gitblit v1.8.0