Closed codeindulgence closed 1 year ago
Hi @codeindulgence, seems a nice feature to add. We are not planning additional work on this plugin in the very-near future but I'm happy to review any pull request for this.
Thanks @keul, happy to try and have a stab at it.
From reading the source I can see that the polygon rendering is driven by the as:marker-add
event (or maybe as:pointer-add
- can you clarify these?).
I'm thinking it'll be something along the lines of setting this.markers
to the set of latLngs
then firing the as:update-polygon
event.
Any advice you can provide would be appreciated!
@codeindulgence so, right now it is already possible to do this with the current API, but it's a bit unfriendly:
active
flagas:point-add
eventPoints can be added by converting them using a full set of Leaflet conversion methods
An example is here: https://codesandbox.io/s/leaflet-area-selection-external-path-1cwzre?file=/src/index.js
If I propose a pull request with an explanation to add on the doc page, would you accept it?
@pierre-alain-b Always happy to see documentation improved. A big 👍 for me
See #18
Hi,
I'm looking for a way to pass in a polygon or list of coords when activating draw mode, which the user can continute to move/add/delete.
Thanks for your work!