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
The first time a geoJson tile is needed, before the load callback fires, the show callback fires with a callback parameter e that seems invalid (e.features is an empty array). Immediately after this happens, the load callback fires with the expected feature data in the argument, and when the same tile is shown again subsequently, the show callback is called with the feature data as expected (in my scenario I'm using tile(false)).
This seems like strange and incorrect behavior. I ran into this because I'm using the show event to dynamically style the features, and the styling wasn't working the first time the tile is shown (but did work if I zoomed in/out again to re-show the tile). Furthermore, to fix this behavior I had to attach my styling callback to the load event as well, which doesn't seem like it should be necessary.
IMO the correct behavior would be to fire the show event after the load event, and to pass in the new tile's features to the show callback.
The text was updated successfully, but these errors were encountered:
This one caused me a lot of confusion.
The first time a geoJson tile is needed, before the
load
callback fires, theshow
callback fires with a callback parametere
that seems invalid (e.features
is an empty array). Immediately after this happens, theload
callback fires with the expected feature data in the argument, and when the same tile is shown again subsequently, theshow
callback is called with the feature data as expected (in my scenario I'm usingtile(false)
).This seems like strange and incorrect behavior. I ran into this because I'm using the
show
event to dynamically style the features, and the styling wasn't working the first time the tile is shown (but did work if I zoomed in/out again to re-show the tile). Furthermore, to fix this behavior I had to attach my styling callback to theload
event as well, which doesn't seem like it should be necessary.IMO the correct behavior would be to fire the
show
event after theload
event, and to pass in the new tile's features to theshow
callback.The text was updated successfully, but these errors were encountered: