
click on the first or last point to add a new first/last point.right-click on middle point marker to split the point.drag the middle point marker to create new points between two existing.right-click on point marker to remove the point.drag the point marker to move it around.


maxMarkers is a max number of editable markers to be shown.Options is a normal Leaflet polyline options object with some additions: var polyline = L.Polyline.PolylineEditor(coordinates, options) The initialization method is: L.Polyline.PolylineEditor(coordinates, options, contexts) Initialize the polyline: L.tileLayer(osmUrl, ).addTo(map) Example with 20,000 points (you need to zoom close enough to be able to edit it).Keep context data with every point (even if new points are added before this one or the current polyline is splitted from the original one).īTW, is still a work in progress and some APIs may change.Add points between two points, before the first point or after the last.

