diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-11-30 12:48:30 -0800 |
---|---|---|
committer | John Firebaugh <john@Johns-MacBook-Pro.local> | 2015-12-01 09:07:03 -0800 |
commit | f27c28b6c4a4796eded7984d7bb3c62f30ba594f (patch) | |
tree | 1223ea7fd6a50e34143982d646bb325665b434b6 /src/mbgl/annotation | |
parent | 60b0e78e0ef7357cf6ef260a6df4241b2c5503db (diff) | |
download | qtlocation-mapboxgl-f27c28b6c4a4796eded7984d7bb3c62f30ba594f.tar.gz |
Partially revert "[core] Source should receive a ref to MapData just once"
This partially reverts commit d55aa7929cb10d40a58b6b7a8ed73bddd4f0a407.
Diffstat (limited to 'src/mbgl/annotation')
-rw-r--r-- | src/mbgl/annotation/annotation_manager.cpp | 6 | ||||
-rw-r--r-- | src/mbgl/annotation/annotation_manager.hpp | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/mbgl/annotation/annotation_manager.cpp b/src/mbgl/annotation/annotation_manager.cpp index c6d5413ec0..5b1138a14a 100644 --- a/src/mbgl/annotation/annotation_manager.cpp +++ b/src/mbgl/annotation/annotation_manager.cpp @@ -1,6 +1,5 @@ #include <mbgl/annotation/annotation_manager.hpp> #include <mbgl/annotation/annotation_tile.hpp> -#include <mbgl/map/map_data.hpp> #include <mbgl/style/style.hpp> #include <mbgl/layer/symbol_layer.hpp> @@ -11,8 +10,7 @@ namespace mbgl { const std::string AnnotationManager::SourceID = "com.mapbox.annotations"; const std::string AnnotationManager::PointLayerID = "com.mapbox.annotations.points"; -AnnotationManager::AnnotationManager(MapData& data_) : data(data_) {} - +AnnotationManager::AnnotationManager() = default; AnnotationManager::~AnnotationManager() = default; AnnotationIDs @@ -110,7 +108,7 @@ std::unique_ptr<AnnotationTile> AnnotationManager::getTile(const TileID& tileID) void AnnotationManager::updateStyle(Style& style) { // Create annotation source, point layer, and point bucket if (!style.getSource(SourceID)) { - std::unique_ptr<Source> source = std::make_unique<Source>(data); + std::unique_ptr<Source> source = std::make_unique<Source>(); source->info.type = SourceType::Annotations; source->info.source_id = SourceID; source->enabled = true; diff --git a/src/mbgl/annotation/annotation_manager.hpp b/src/mbgl/annotation/annotation_manager.hpp index 16ebd16716..f1b41c9ccc 100644 --- a/src/mbgl/annotation/annotation_manager.hpp +++ b/src/mbgl/annotation/annotation_manager.hpp @@ -13,7 +13,6 @@ namespace mbgl { -class MapData; class PointAnnotation; class ShapeAnnotation; class AnnotationTile; @@ -22,7 +21,7 @@ class Style; class AnnotationManager : private util::noncopyable { public: - AnnotationManager(MapData&); + AnnotationManager(); ~AnnotationManager(); AnnotationIDs addPointAnnotations(const std::vector<PointAnnotation>&, const uint8_t maxZoom); @@ -43,7 +42,6 @@ public: private: std::unique_ptr<AnnotationTile> getTile(const TileID&); - MapData& data; AnnotationID nextID = 0; PointAnnotationImpl::Tree pointTree; PointAnnotationImpl::Map pointAnnotations; |