mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Map 'load' event does not fire when centering the map outside of locations of partial tile sets (NAIP)

Open spjy opened this issue 1 year ago • 3 comments

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.

spjy avatar Apr 18 '24 19:04 spjy

We are also experiencing this

JarekToro avatar Jul 24 '24 19:07 JarekToro

Hi @spjy,

Good catch, we'll fix that in the upcoming release.

stepankuzmin avatar Jul 30 '24 08:07 stepankuzmin

@stepankuzmin Any timeline on when this may be fixed?

spjy avatar Oct 16 '24 15:10 spjy