派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-03-10 f21ba60dd8cd2f9f021d579fe52325abd37f4af1
src/Sgis.js
@@ -10,6 +10,12 @@
import MapConfig from '@/conf/MapConfig'
import DashFlow from '@components/plugin/PathDashFlow'
import CanvasMarkers from '@components/plugin/CanvasMarkers'
import FullScreen from '@components/plugin/FullScreen'
// 下载
import DownLoad from '@components/plugin/DownLoad'
// 测量
import LeafletMeasurePath from '@components/plugin/leaflet-measure-path/leaflet-measure-path'
let map = null
const L = window.L
const initMap = (div) => {
@@ -25,7 +31,11 @@
  // CustomPopup.init(L) // 自定义弹出框
  DashFlow.DashFlow(L) // 流动线图
  CanvasMarkers.init(L)// 画布图层
  // Leaflet扩展代码
  // 全屏
  FullScreen.init(L)
  // 下载
  DownLoad.init(L)
  LeafletMeasurePath.init(L)
  map = L.map(div, MapConfig.mapOptions)
@@ -34,6 +44,7 @@
  })
  window.map = map
  window.L = L
  initTileLayersHelper(map)
  return map
}