Getting info from draw on useControl #1949
Unanswered
zayne-anthony
asked this question in
Q&A
Replies: 1 comment 9 replies
-
Create a CodeSandbox if you need help. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am trying to add a feature to my map where you can isolate markers/points inside a drawn polygon. As of right now I am having trouble using the draw useControl. It is in the map just fine, but getting the values from onCreate/onUpdate is just not working. I have tried console logging any value I an think of when it should during the onCreate/onUpdate but I am not getting anything. Not even an error. It just seems it's not firing. I have followed the example on
react-map-gl
and even doing that it doesn't store anything inside the feature state.Sandbox: https://codesandbox.io/s/condescending-margulis-yixddb?file=/src/Mapbox.js
Here is my code:
Beta Was this translation helpful? Give feedback.
All reactions