When drawing a polygon, how can i programmatically add a vertex? #1530
Replies: 1 comment
-
We have no public API for that, but you can use the internal methods (which could change in the far away future).
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my application (Vue3), I am allowing users to draw a polygon using geoman. There is a request that they be able to manually input exact coordinates for the vertices as well. What is the correct way to add a new vertex to a polygon supping a have a reference to the layer? I am currently using the setLatLngs() method which does update the shape, but it does not fully register with the geoman. For example, I can't click on the manually added point to close the polygon.
Also, supposing the user wants to enter all the vertices, what is the correct call to complete the shape that will also trigger the pm:create event?
Beta Was this translation helpful? Give feedback.
All reactions