| | |
| | | // 🍂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) |
| | | return line |
| | | }, |
| | | // 箭头标绘 |
| | | startPolylineArrow: function (latlng, options) { |
| | | const lineArrow = this.createPolyline([], { |
| | | color: 'black', |
| | | weight: 3, |
| | | opacity: 1.0 |
| | | }) |
| | | lineArrow.enableEdit(this.map).newShape(latlng) |
| | | return lineArrow |
| | | }, |
| | | |
| | | // 🍂method startPolygon(latlng: L.LatLng, options: hash): L.Polygon |
| | |
| | | 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. |
| | | // In any case, it will follow the user mouse, and will have a final `latlng` on next click (or touch). |