-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: fallback for getting feature id #1566
Conversation
✅ Deploy Preview for eoxelements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏾
Hmm.. this actually does not work for the "regions" click example, as those features don't have an "id" property |
hmmm, shouldn't it have a unique identifier from ol in any case ? |
I now changed it to use the |
Also had to fix some other issues that were introduced with the projection transformation (zooming of feature to wrong projection), I directly added that to this PR. Now it works again as it did in the past :-) Screencast_00008.mp4 |
Implemented changes
This PR introduces a small fix for getting the feature id correctly when rendering the feature list. Previously,
feature.getId()
wouldn't return an id correctly, since it can only be retrieved for features wheresetId()
was executed on. By providing the fallbackfeature.get("id")
we cover both cases (set("id", <id>)
andsetId(<id>)
).Checklist before requesting a review