派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-03-15 a0dce9c7d37e4b34d2e458e00517055c94b03484
src/components/plugin/Editable.js
@@ -298,10 +298,10 @@
      connectCreatedToMap: function (layer) {
        return this.featuresLayer.addLayer(layer)
      },
      // 🍂method startPolyline(latlng: L.LatLng, options: hash): L.Polyline
      // Start drawing a Polyline. If `latlng` is given, a first point will be added. In any case, continuing on user click.
      // If `options` is given, it will be passed to the Polyline class constructor.
      // 画线
      startPolyline: function (latlng, options) {
        const line = this.createPolyline([], options)
        line.enableEdit(this.map).newShape(latlng)
@@ -316,6 +316,12 @@
        polygon.enableEdit(this.map).newShape(latlng)
        return polygon
      },
      // circleMarker :function (latlng,options) {
      //   const yuan = this.circleMarker(latlng,options)
      //   yuan.enableEdit(this.map).newShape(latlng)
      //   return yuan
      // }
      // 🍂method startMarker(latlng: L.LatLng, options: hash): L.Marker
      // Start adding a Marker. If `latlng` is given, the Marker will be shown first at this point.
@@ -347,18 +353,6 @@
        const circle = this.createCircle(latlng, options)
        circle.enableEdit(this.map).startDrawing()
        return circle
      },
      // 文字标注
      startText: function (latlng, options) {
        latlng = latlng || this.map.getCenter().clone()
        const markerBuilding = this.createMarker(latlng, options).bindTooltip('问题标注内容', {
          offset: [0, 0],
          permanent: true,
          direction: 'top',
          className: 'anim-tooltip'
        })
        markerBuilding.enableEdit(this.map).startDrawing()
        return markerBuilding
      },
      // 图标标注