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 'load' event does not fire when centering the map outside of locations of partial tile sets (NAIP) #13157

Open
spjy opened this issue Apr 18, 2024 · 0 comments

Comments

@spjy
Copy link

spjy commented Apr 18, 2024

When centering the map in non-NAIP areas (e.g. outside of the contiguous United States) using the NAIP tileset, the map fails to trigger the load map event, even though the map and tiles are visible. Strangely, when interacting with the map, like panning or zooming, only then the load map event fires.

This issue gets resolved for the majority of cases if I specify a bounds on the tile set, but it won't work all cases since there are portions of the United States and Mexico that get included in the bounding box. See the following image.

image

mapbox-gl-js version: 3.3.0

browser: Firefox 125.0

Steps to Trigger Behavior

  1. Enter your access token on line 29
  2. Open browser console
  3. Notice 'loaded' does not get logged to the console
  4. Interact with the map (e.g. pan / zoom)
  5. Notice 'loaded' gets logged to the console
  6. Uncomment bounds property on line 44/45
  7. Notice map loads properly at the same center point, as it is outside of the bounding box

Link to Demonstration

https://stackblitz.com/edit/mapbox-mapboxgl-tsh2bl?file=index.html

Expected Behavior

The map 'load' event should fire, and the logged text 'loaded' should show in the console.

Actual Behavior

The map 'load' event does not fire, and the logged next 'loaded' does not show even though the map and tiles are visible and interactable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant