Keep a pointer to GlyphStore on ResourceLoader
For now, keep a pointer so we can subscribe/unsubscribe to events. In the future, we should move this object completely to ResourceLoader, but we can't do it now because we delete the ResourceLoader when changing the style.
This commit is contained in:
@@ -134,6 +134,7 @@ void MapContext::loadStyleJSON(const std::string& json, const std::string& base)
|
||||
resourceLoader->setAccessToken(data.getAccessToken());
|
||||
resourceLoader->setObserver(this);
|
||||
resourceLoader->setStyle(style.get());
|
||||
resourceLoader->setGlyphStore(glyphStore.get());
|
||||
|
||||
triggerUpdate(Update::Zoom);
|
||||
}
|
||||
@@ -141,8 +142,7 @@ void MapContext::loadStyleJSON(const std::string& json, const std::string& base)
|
||||
void MapContext::updateTiles() {
|
||||
assert(Environment::currentlyOn(ThreadType::Map));
|
||||
|
||||
resourceLoader->update(data, transformState, *glyphAtlas, *glyphStore,
|
||||
*spriteAtlas, *texturePool);
|
||||
resourceLoader->update(data, transformState, *glyphAtlas, *spriteAtlas, *texturePool);
|
||||
}
|
||||
|
||||
void MapContext::updateAnnotationTiles(const std::vector<TileID>& ids) {
|
||||
|
||||
Reference in New Issue
Block a user