-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix Map#areTilesLoading from not returning true on final sourcedata event #4987
Conversation
I would lean towards this approach, because of the use case where someone does |
yeah – I think that makes sense @anandthakker and it doesn't seem to break anything 🤞 |
@mollymerp On a second look, I'm thinking it's non-ideal to be firing this event via |
@anandthakker it does fire the event, |
Ohhhh, I see 🤦♂️ . In that case, I withdraw my previous comment -- since it's |
ready for your 👓 ✅ @anandthakker ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
One very small nitpick inline
test/unit/source/tile.test.js
Outdated
const tile = new Tile(new TileCoord(1, 1, 1)); | ||
tile.loadVectorData(createVectorData(), createPainter()); | ||
t.stub(tile, 'reloadSymbolData').returns(null); | ||
const options = util.extend(new Evented(), { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could we call this source
rather than options
?
This is still happening. |
@volkanunsal if you're still seeing this happening, can you please open a new issue with a minimal reproduction of the problem so that we can better diagnose it? thanks! |
Fixes #4975
When tiles are
reloading
they don't fire asourcedata
event when they finish loading unless debug collision boxes are enabled (https://github.com/mapbox/mapbox-gl-js/blob/master/src/source/tile.js#L232 🤔 )this approach changes the
areTilesLoaded
check to acceptreloading
tiles as loaded, but an alternative approach could be removing the conditional intile.js
linked above so that a sourcedata event would be fired when allreloading
tiles switch back toloaded
.cc @ksummerill
Launch Checklist