Leaflet.draw icon indicating copy to clipboard operation
Leaflet.draw copied to clipboard

close shape on polyline tool

Open jasonbaik opened this issue 8 years ago • 4 comments

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
      }
});

jasonbaik avatar Oct 14 '16 16:10 jasonbaik