Move Annotation class to cpp file
This commit is contained in:
@@ -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_)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user