Leaflet / Leaflet.draw

Vector drawing and editing plugin for Leaflet
https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html
MIT License
1.96k stars 992 forks source link

Create polyline with some points non editable #1062

Open lympe92 opened 1 year ago

lympe92 commented 1 year ago

Hello guys, I use leaflet draw to create a polyline. I created a polyline programmatically.

this.polylineDrawer = new L.Draw.Polyline(this.map, {}) this.polylineDrawer.enable();

allMarkerscoords.forEach((mCoord)=> {let latlng=L.latLng(mCoord[0], mCoord[1]);
  this.polylineDrawer.addVertex(latlng);
})

this.polylineDrawer.completeShape()

I want to know if i can keep some points of editable polyline as non editable. How can i do that?