diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp index 3db1138dfd4..cf06dd06eb2 100644 --- a/src/mbgl/map/map_context.cpp +++ b/src/mbgl/map/map_context.cpp @@ -169,7 +169,7 @@ void MapContext::update() { data.setAnimationTime(Clock::now()); - if (style->isLoaded() && updateFlags & Update::Annotations) { + if (style->loaded && updateFlags & Update::Annotations) { data.getAnnotationManager()->updateStyle(*style); updateFlags |= Update::Classes; } diff --git a/src/mbgl/style/style.hpp b/src/mbgl/style/style.hpp index 4eef6cce75a..dbaf8cf02c9 100644 --- a/src/mbgl/style/style.hpp +++ b/src/mbgl/style/style.hpp @@ -100,7 +100,6 @@ class Style : public GlyphStore::Observer, void emitTileDataChanged(); void emitResourceLoadingFailed(std::exception_ptr error); - bool loaded = false; bool shouldReparsePartialTiles = false; Observer* observer = nullptr; @@ -112,6 +111,7 @@ class Style : public GlyphStore::Observer, bool hasPendingTransitions = false; public: + bool loaded = false; Worker workers; };