fixes #1675: abstract annotation tile refresh check/render; trigger post-sprite/sprite store load
This commit is contained in:
@@ -142,9 +142,11 @@ void MapContext::loadStyleJSON(const std::string& json, const std::string& base)
|
||||
|
||||
updateFlags |= Update::DefaultTransition | Update::Classes | Update::Zoom;
|
||||
asyncUpdate->send();
|
||||
}
|
||||
|
||||
auto staleTiles = data.getAnnotationManager()->resetStaleTiles();
|
||||
if (!staleTiles.empty()) {
|
||||
void MapContext::updateAnnotationTilesIfNeeded() {
|
||||
if (data.getAnnotationManager()->getStaleTileCount()) {
|
||||
auto staleTiles = data.getAnnotationManager()->resetStaleTiles();
|
||||
updateAnnotationTiles(staleTiles);
|
||||
}
|
||||
}
|
||||
@@ -417,4 +419,8 @@ void MapContext::onResourceLoadingFailed(std::exception_ptr error) {
|
||||
}
|
||||
}
|
||||
|
||||
void MapContext::onSpriteStoreLoaded() {
|
||||
updateAnnotationTilesIfNeeded();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user