diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-14 18:08:02 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-20 13:54:19 -0700 |
commit | c5b95032a5cb9d3c7c39a7a74656f33de1c68d6e (patch) | |
tree | 6c73190d5f86b40c55e810bc244d30766051acdc /include | |
parent | 597b2b48511b68c7a6494386b414da479c436bd7 (diff) | |
download | qtlocation-mapboxgl-c5b95032a5cb9d3c7c39a7a74656f33de1c68d6e.tar.gz |
[core] Annotation refactor
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/annotation/annotation.hpp | 6 | ||||
-rw-r--r-- | include/mbgl/map/map.hpp | 6 | ||||
-rw-r--r-- | include/mbgl/util/geo.hpp | 4 |
3 files changed, 6 insertions, 10 deletions
diff --git a/include/mbgl/annotation/annotation.hpp b/include/mbgl/annotation/annotation.hpp index fd21cd5f6a..b3e3ab52b6 100644 --- a/include/mbgl/annotation/annotation.hpp +++ b/include/mbgl/annotation/annotation.hpp @@ -6,12 +6,6 @@ namespace mbgl { -enum class AnnotationType : uint8_t { - Any = 0, - Point = 1 << 0, - Shape = 1 << 1, -}; - using AnnotationID = uint32_t; using AnnotationIDs = std::vector<AnnotationID>; diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 8a381cda65..70807f126f 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -135,9 +135,6 @@ public: const LatLng latLngForPixel(const vec2<double> pixel) const; // Annotations - void setDefaultPointAnnotationSymbol(const std::string&); - double getTopOffsetPixelsForAnnotationSymbol(const std::string&); - AnnotationID addPointAnnotation(const PointAnnotation&); AnnotationIDs addPointAnnotations(const std::vector<PointAnnotation>&); @@ -147,8 +144,9 @@ public: void removeAnnotation(AnnotationID); void removeAnnotations(const AnnotationIDs&); - AnnotationIDs getAnnotationsInBounds(const LatLngBounds&, const AnnotationType& = AnnotationType::Any); + AnnotationIDs getPointAnnotationsInBounds(const LatLngBounds&); LatLngBounds getBoundsForAnnotations(const AnnotationIDs&); + double getTopOffsetPixelsForAnnotationSymbol(const std::string&); // Sprites void setSprite(const std::string&, std::shared_ptr<const SpriteImage>); diff --git a/include/mbgl/util/geo.hpp b/include/mbgl/util/geo.hpp index 1f073ded8f..307134f666 100644 --- a/include/mbgl/util/geo.hpp +++ b/include/mbgl/util/geo.hpp @@ -1,6 +1,8 @@ #ifndef MBGL_UTIL_GEO #define MBGL_UTIL_GEO +#include <mbgl/util/vec.hpp> + namespace mbgl { class TileID; @@ -14,6 +16,8 @@ struct LatLng { // Constructs a LatLng object with the top left position of the specified tile. LatLng(const TileID& id); + + vec2<double> project() const; }; struct ProjectedMeters { |