Move Annotation class to cpp file

This commit is contained in:
John Firebaugh
2015-09-21 17:32:50 -07:00
parent bc9aaa5e91
commit 588fed9a9d
2 changed files with 15 additions and 22 deletions

View File

@@ -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_)

View File

@@ -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;