From 588fed9a9d01e03165ff70b537b892995a1d24e3 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 21 Sep 2015 17:32:50 -0700 Subject: Move Annotation class to cpp file --- src/mbgl/map/annotation.cpp | 17 +++++++++++++++-- src/mbgl/map/annotation.hpp | 20 -------------------- 2 files changed, 15 insertions(+), 22 deletions(-) (limited to 'src') 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 #include - #include -#include 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::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::Hash> tilePointFeatures; - const LatLngBounds bounds; -}; - class AnnotationManager : private util::noncopyable { public: typedef std::unordered_set AffectedTiles; -- cgit v1.2.1