派生自 wuyushui/SewerAndRainNetwork

wangqi
2021-03-15 3472e776001899505d7dd540a021d07be9c54cd5
src/Sgis.js
@@ -4,14 +4,22 @@
import Editable from '@components/plugin/Editable'
import PathDrag from '@components/plugin/PathDrag'
import MagicMarker from '@components/plugin/MagicMarker'
import WmtsSupport from '@components/plugin/wmts_plugins'
// import MagicMarker from '@components/plugin/MagicMarker'
// import WmtsSupport from '@components/plugin/wmts_plugins'
import MapConfig from '@/conf/MapConfig'
import DashFlow from '@components/plugin/PathDashFlow'
import CanvasMarkers from '@components/plugin/CanvasMarkers'
import FullScreen from '@components/plugin/FullScreen'
import '@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'
import 'leaflet.markercluster'
// import 'leaflet-canvas-markers'
import './components/plugin/Leaflet.GridLayer.FadeOut' // 瓦片图层切换淡入淡出
import './components/plugin/leaflet-canvas-markers' // 画布marker
let map = null
const L = window.L
const initMap = (div) => {
@@ -22,14 +30,15 @@
  // Leaflet扩展代码
  Editable.init(L) // 图层编辑
  PathDrag.init(L) // 路径拖拽
  MagicMarker.init(L) // 动画Marker
  WmtsSupport.init(L) // 扩展,使支持WMTS
  // MagicMarker.init(L) // 动画Marker
  // WmtsSupport.init(L) // 扩展,使支持WMTS
  // CustomPopup.init(L) // 自定义弹出框
  DashFlow.DashFlow(L) // 流动线图
  CanvasMarkers.init(L)// 画布图层
  // Leaflet扩展代码
  // CanvasMarkers.init(L)// 画布图层
  // 全屏
  FullScreen.init(L)
  // FullScreen.init(L)
  // 下载
  DownLoad.init(L)
  LeafletMeasurePath.init(L)
  map = L.map(div, MapConfig.mapOptions)
@@ -38,6 +47,7 @@
  })
  window.map = map
  window.L = L
  initTileLayersHelper(map)
  return map
}