Leaflet.draw
Leaflet.draw copied to clipboard
close shape on polyline tool
hi, is there anyone that knows how to invoke "completeShape()" on the polyline tool? currently i check for how many vertexes are created but can't seem to complete the polyline after 1 vertex is drawn:
map.on('draw:drawvertex', function(e) {
if (Object.keys(e.layers._layers).length > 1) {
// need to close polyline here
}
});