-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edit existing polygons? #1685
Comments
If anyone wondering, I've did it with Draggable Markers. and the function: |
Mr. Nemanja Ristic i tried but not success i am confused at "this.state.editing" from where it take value please share full example. |
Hey, my setup is the same like in the example of PolygonCreator(https://github.com/react-community/react-native-maps/blob/master/example/examples/PolygonCreator.js). In place where they do this(line 144-153): And then the function : Editing is from state which refers to coordinates as you draw points of your polygon. Hope I helped :) |
Thanks you much Mr.Nemanja Ristic ,problem resolved and now i am moving ahead in my project and have one doubt once again thanks |
Hey mate, that I would not know. You'd need to open a new issue for that. Haven't really tried overlays so for that you'd need someone experienced. But you could do conditional rendering with some boolean to toggle on/off the overlay if it fits the entire map. |
Hello @Bassonlinho , As previous comment you share code of polygon it is editable but i want some thing like below |
I was looking for that too but no luck. I think you'd need to use some algorithm or 3rd party lib that would give you geometry of point in middle so that it can be dynamically added. Open new issue for that, I'm closing this down, cheers mate! 👍 |
Hi @Bassonlinho There has anyways to draw the polygon with fill colors like on the web we have this feature, https://codepen.io/mdashikar/pen/gvMpXK?editors=1010 |
@Bassonlinho can you please share your full code how you drag polygon |
@tizenix Hey mate I moved away from the project I worked on, but following my first two comments and the solution should help enough :) |
Hello I've been using your component for some time now and I'm very grateful for your work.
However I've got a question for you:
Is it possible to edit drawn polygons? Like drag the points of polygon to reshape it or something?
Thanks in advance!
Kind regards
The text was updated successfully, but these errors were encountered: