Closed mikejamesthompson closed 1 month ago
Is this addressed by 3.6 via https://github.com/mapbox/mapbox-gl-js/commit/5e8ca3275fa6875aa2a58c38b78112fa63e756de ? (I think we ran into the same issue as you so might try upgrading to 3.6 to see if it helps)
Is this addressed by 3.6 via 5e8ca32 ? (I think we ran into the same issue as you so might try upgrading to 3.6 to see if it helps)
Thanks for this.
I've added 3.6.0 to that demo application and that confirms that the issue has been fixed: https://mb-sourcedata.surge.sh
mapbox-gl-js version: >= 3
browser: Chrome 124, Firefox 124
Link to Demonstration
https://mb-sourcedata.surge.sh/
Expected Behavior
We use code like the following in our application to synchronise map feature state with application state when a new GeoJSON source has been loaded:
We rely on there being a
sourcedata
event fired whereisSourceLoaded
is true and the features are available within the source in order to update the map feature state.Actual Behavior
When migrating to version 3, we found that this approach no longer works:
isSourceLoaded
never returns true for asourcedata
event that isn't of typemetadata
.The link above is to a tiny application that logs these events for different versions of Mapbox and shows the different value of
isSourceLoaded
returned for v2.15.0 when compared tov3.0.0
andv3.3.0
.