-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
document that setFeatureState needs numeric ids #10105
Comments
Hey, we're using string IDs without issues in Just wanted to let you know. |
Strange I put together a minimal example https://jsfiddle.net/andrewharvey4/1oLj6u8t/3/ and it's not working with string ids. |
Aha, that makes ... sense. Ids in mapbox cannot be numbers, but you can use promoteId to "promote" another property to use in setFeatureState, and that one can be a string: https://jsfiddle.net/g1wL8q7n/ Not very well documented tho, and I spent hours trying to figure out how to. 😅 |
Seriously, I just wasted 1/2 a day trying to figure out why Please fix the document, this was absolutely exhausting. |
Thanks for the feedback here, I have a small improvement in #10356 |
#9559 changed the documentation for
setFeatureState
which previously readThat part was removed, however it appears that string
id
's don't work when usingsetFeatureState
.I couldn't find an existing ticket, so short of implementing this so that string id's work, we could better document this limitation.
The text was updated successfully, but these errors were encountered: