summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-09-21 17:32:50 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-09-28 14:10:01 -0700
commit588fed9a9d01e03165ff70b537b892995a1d24e3 (patch)
treef3dc86330e9200d3447d0cfd3562a854daa9a234 /src
parentbc9aaa5e9101d766f9f533110e2bf458a947b9cc (diff)
downloadqtlocation-mapboxgl-588fed9a9d01e03165ff70b537b892995a1d24e3.tar.gz
Move Annotation class to cpp file
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/annotation.cpp17
-rw-r--r--src/mbgl/map/annotation.hpp20
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;