diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/map/annotation.cpp | 17 | ||||
-rw-r--r-- | src/mbgl/map/annotation.hpp | 20 |
2 files changed, 15 insertions, 22 deletions
diff --git a/src/mbgl/map/annotation.cpp b/src/mbgl/map/annotation.cpp index 1252399b85..cfc9b4fae5 100644 --- a/src/mbgl/map/annotation.cpp +++ b/src/mbgl/map/annotation.cpp @@ -8,12 +8,25 @@ #include <mbgl/util/ptr.hpp> #include <mbgl/util/string.hpp> - #include <algorithm> -#include <memory> namespace mbgl { +class Annotation : private util::noncopyable { +public: + Annotation(AnnotationType, const AnnotationSegments&, const StyleProperties&); + + const StyleProperties styleProperties; + + LatLng getPoint() const; + LatLngBounds getBounds() const { return bounds; } + + const AnnotationType type = AnnotationType::Point; + const AnnotationSegments geometry; + std::unordered_map<TileID, std::weak_ptr<const LiveTileFeature>, TileID::Hash> tilePointFeatures; + const LatLngBounds bounds; +}; + Annotation::Annotation(AnnotationType type_, const AnnotationSegments& geometry_, const StyleProperties& styleProperties_) diff --git a/src/mbgl/map/annotation.hpp b/src/mbgl/map/annotation.hpp index 6f76b697fe..60cafdf342 100644 --- a/src/mbgl/map/annotation.hpp +++ b/src/mbgl/map/annotation.hpp @@ -23,29 +23,9 @@ class Annotation; class PointAnnotation; class ShapeAnnotation; class LiveTile; -class LiveTileFeature; using GeoJSONVT = mapbox::util::geojsonvt::GeoJSONVT; -class Annotation : private util::noncopyable { - friend class AnnotationManager; -public: - Annotation(AnnotationType, const AnnotationSegments&, const StyleProperties&); - -public: - const StyleProperties styleProperties; - -private: - LatLng getPoint() const; - LatLngBounds getBounds() const { return bounds; } - -private: - const AnnotationType type = AnnotationType::Point; - const AnnotationSegments geometry; - std::unordered_map<TileID, std::weak_ptr<const LiveTileFeature>, TileID::Hash> tilePointFeatures; - const LatLngBounds bounds; -}; - class AnnotationManager : private util::noncopyable { public: typedef std::unordered_set<TileID, TileID::Hash> AffectedTiles; |