派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-03-18 9d2afa1207092e9f06fd7ce9d83aea5e98d40dc0
Merge branch 'master' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into master
3个文件已修改
16 ■■■■■ 已修改文件
src/Sgis.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/plugin/MeaSure.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/plugin/leaflet-measure-path/leaflet-measure-path.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/Sgis.js
@@ -10,7 +10,7 @@
// import FullScreen from '@components/plugin/FullScreen'
import DownLoad from '@components/plugin/DownLoad'
// 测量
import LeafletMeasurePath from '@components/plugin/leaflet-measure-path/leaflet-measure-path'
import '@components/plugin/leaflet-measure-path/leaflet-measure-path'
import 'leaflet.markercluster'
// import 'leaflet-canvas-markers'
@@ -36,7 +36,7 @@
  // FullScreen.init(L)
  // 下载
  DownLoad.init(L)
  LeafletMeasurePath.init(L)
  // LeafletMeasurePath.init(L)
  map = L.map(div, MapConfig.mapOptions)
src/components/plugin/MeaSure.js
@@ -53,6 +53,9 @@
  },
  dblclick: function (e) { // 双击结束
    console.log('双击结束', e)
    areaMeasure.polygon.enableEdit()
    areaMeasure.polygon.dragging.disable()
    areaMeasure.map.on('editable:vertex:drag editable:vertex:deleted', areaMeasure.polygon.updateMeasurements, areaMeasure.polygon)
    areaMeasure.polygon.addTo(areaMeasure.layers)
    areaMeasure.close(e.latlng)
//areaMeasure.polygon.enableEdit();
@@ -120,12 +123,16 @@
      color: 'red'
    })
    distanceMeasure.polyline.addTo(distanceMeasure.layers)
    // distanceMeasure.polyline.enableEdit()
    distanceMeasure.layers.addTo(distanceMeasure.map)
    distanceMeasure.points.pop()
  },
  dblclick: function (e) { // 双击结束
    console.log('双击结束', e)
    distanceMeasure.polyline.enableEdit()
    distanceMeasure.polyline.dragging.disable()
    distanceMeasure.polyline.addTo(distanceMeasure.layers)
    distanceMeasure.map.on('editable:vertex:drag editable:vertex:deleted', distanceMeasure.polyline.updateMeasurements, distanceMeasure.polyline)
    distanceMeasure.close(e.latlng)
    distanceMeasure.map.off('click', distanceMeasure.click).off('mousemove', distanceMeasure.mousemove).off('dblclick', distanceMeasure.dblclick)
  },
src/components/plugin/leaflet-measure-path/leaflet-measure-path.js
@@ -1,5 +1,4 @@
/* eslint-disable */
const init = (L) => {
    !(function() {
        'use strict'
@@ -420,7 +419,3 @@
            addInitHook.call(this)
        })
    })()
}
export default {
    init
}