Replies: 1 comment 1 reply
-
Hi @stjasink, You should assign a reference like this: <Polygon
ref={(ref) => (refs.current[key] = ref)}
positions={getLinePoints()}
/> After that, you can enable editing by using: refs.current[key].enableEdit(); This way, you'll have access to the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am looking for some guidance please. The demo shows how to use the controls to create new editable layers. I need to render a number of Markers, Polylines and Polygons that I already have data for, in addition to being able to create new ones.
For example I have a few lines something like this:
How can I set these layers to be rendered as immediately editable? I don't need to do any special event handling yet. I tried simply adding an editable={true} attribute in the hope that it would work, but did not.
BTW I have some code that uses LeafletEditable in a non-React app and I set layers to be editable like this when I create them:
Any help appreciated, thanks!
Stephen
Beta Was this translation helpful? Give feedback.
All reactions