diff options
Diffstat (limited to 'src/mbgl/annotation')
-rw-r--r-- | src/mbgl/annotation/annotation_manager.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/annotation/annotation_manager.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/annotation/annotation_tile.cpp | 5 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp index 049c900b95..88153f5fb7 100644 --- a/src/mbgl/annotation/annotation_manager.cpp +++ b/src/mbgl/annotation/annotation_manager.cpp @@ -175,8 +175,6 @@ void AnnotationManager::updateStyle(Style& style) { layer->setIconAllowOverlap(true); layer->setIconIgnorePlacement(true); - layer->impl->spriteAtlas = &spriteAtlas; - style.addLayer(std::move(layer)); } diff --git a/src/mbgl/annotation/annotation_manager.hpp b/src/mbgl/annotation/annotation_manager.hpp index 5e2994c44e..0ab43bec15 100644 --- a/src/mbgl/annotation/annotation_manager.hpp +++ b/src/mbgl/annotation/annotation_manager.hpp @@ -75,6 +75,8 @@ private: std::unordered_set<std::string> obsoleteShapeAnnotationLayers; std::unordered_set<AnnotationTile*> tiles; SpriteAtlas spriteAtlas; + + friend class AnnotationTile; }; } // namespace mbgl diff --git a/src/mbgl/annotation/annotation_tile.cpp b/src/mbgl/annotation/annotation_tile.cpp index 9d28f67785..fd182b70bc 100644 --- a/src/mbgl/annotation/annotation_tile.cpp +++ b/src/mbgl/annotation/annotation_tile.cpp @@ -3,6 +3,7 @@ #include <mbgl/util/constants.hpp> #include <mbgl/storage/file_source.hpp> #include <mbgl/style/update_parameters.hpp> +#include <mbgl/style/style.hpp> #include <utility> @@ -10,7 +11,9 @@ namespace mbgl { AnnotationTile::AnnotationTile(const OverscaledTileID& overscaledTileID, const style::UpdateParameters& parameters) - : GeometryTile(overscaledTileID, AnnotationManager::SourceID, parameters), + : GeometryTile(overscaledTileID, AnnotationManager::SourceID, parameters, + *parameters.style.glyphAtlas, + parameters.annotationManager.spriteAtlas), annotationManager(parameters.annotationManager) { annotationManager.addTile(*this); } |