You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm rendering a bunch of point data as circles, and would like to generate a popup when hovering or clicking them. This is done by retrieving the lnglat of the point, and setting the popup there.
A snag
When I interact with features more than a world-wrap away (when Math.abs(longitude)>180), the popup doesn't show up anymore. Or rather, it gets projected to the un-worldwrapped location (-180<longitude<180). This is because queryRenderedFeatures returns the same longitude coordinates for the same feature, no matter how many worldwraps away I go.
A proposal
Return world-wrapped longitudes with qRF queries. This also makes it consistent with current project/unproject behavior.
The text was updated successfully, but these errors were encountered:
We discussed this and other edge cases (bounding box that spans more than one world) when implementing queryRenderedFeatures, and decided on the current behavior. Instead of revisiting that, I think we need to fix #2071.
Scenario
I'm rendering a bunch of point data as circles, and would like to generate a popup when hovering or clicking them. This is done by retrieving the lnglat of the point, and setting the popup there.
A snag
When I interact with features more than a world-wrap away (when
Math.abs(longitude)>180
), the popup doesn't show up anymore. Or rather, it gets projected to the un-worldwrapped location (-180<longitude<180
). This is becausequeryRenderedFeatures
returns the same longitude coordinates for the same feature, no matter how many worldwraps away I go.A proposal
Return world-wrapped longitudes with
qRF
queries. This also makes it consistent with currentproject
/unproject
behavior.The text was updated successfully, but these errors were encountered: