派生自 wuyushui/SewerAndRainNetwork

zhangshuaibao
2021-04-12 5c8fde411c0dab24ee394239287412d4665b8c03
src/Sgis.js
@@ -1,7 +1,7 @@
import BasemapHelper from '@components/helpers/BasemapHelper'
import VectorLayerHelper from '@components/helpers/VectorLayerHelper'
// 初始化显示
// import '@components/plugin/PathDrag'
import '@components/plugin/PathDrag'
import MapConfig from '@/conf/MapConfig'
import '@components/plugin/PathDashFlow' // 流动线图
import DownLoad from '@components/plugin/DownLoad'
@@ -20,13 +20,13 @@
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)