summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-10-14 18:08:02 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-10-20 13:54:19 -0700
commitc5b95032a5cb9d3c7c39a7a74656f33de1c68d6e (patch)
tree6c73190d5f86b40c55e810bc244d30766051acdc /include
parent597b2b48511b68c7a6494386b414da479c436bd7 (diff)
downloadqtlocation-mapboxgl-c5b95032a5cb9d3c7c39a7a74656f33de1c68d6e.tar.gz
[core] Annotation refactor
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/annotation/annotation.hpp6
-rw-r--r--include/mbgl/map/map.hpp6
-rw-r--r--include/mbgl/util/geo.hpp4
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 {