Skip to content
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

map.queryRenderedFeatures with bbox around anti-meridian returns strange results #5381

Open
kamil-sienkiewicz-asi opened this issue Jan 21, 2025 · 0 comments
Labels
bug Something isn't working globe Globe related issues PR is more than welcomed Extra attention is needed

Comments

@kamil-sienkiewicz-asi
Copy link
Contributor

maplibre-gl-js version: 5.0.0

browser:

Steps to Trigger Behavior

  1. Add random polygons to map
  2. Call map.queryRenderedFeatures with bbox based on e.point and some offset
  3. Click on polygons near anti-meridian

Link to Demonstration

https://jsbin.com/dogozitaqe/1/edit?html,output

Expected Behavior

Features are correctly returned from this function

Actual Behavior

Some features are returned correctly, some are simply ignored. When clicking on antimeridian all features around globe on given latitude are returned.

I see 2 issues:

  1. Polygon at the bottom of the screen is not returned by queryRenderedFeatures
  2. When I click on the anti-meridian, query is performed for features around the globe instead on bbox near anti-meridian.
Kapture.2025-01-21.at.17.49.54.webm
@HarelM HarelM added bug Something isn't working PR is more than welcomed Extra attention is needed globe Globe related issues labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working globe Globe related issues PR is more than welcomed Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants