summaryrefslogtreecommitdiff
path: root/include/mbgl/annotation
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-10-15 11:38:58 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-10-20 13:54:19 -0700
commit597b2b48511b68c7a6494386b414da479c436bd7 (patch)
tree50f22e46fc691772ec7eea2db546e9110a8e610e /include/mbgl/annotation
parent8baa804a44927fe23b4fed3cb07eb6db9a78f2e8 (diff)
downloadqtlocation-mapboxgl-597b2b48511b68c7a6494386b414da479c436bd7.tar.gz
[core] Pull annotation typedefs to own header; add AnnotationID
Diffstat (limited to 'include/mbgl/annotation')
-rw-r--r--include/mbgl/annotation/annotation.hpp20
-rw-r--r--include/mbgl/annotation/shape_annotation.hpp8
2 files changed, 25 insertions, 3 deletions
diff --git a/include/mbgl/annotation/annotation.hpp b/include/mbgl/annotation/annotation.hpp
new file mode 100644
index 0000000000..fd21cd5f6a
--- /dev/null
+++ b/include/mbgl/annotation/annotation.hpp
@@ -0,0 +1,20 @@
+#ifndef MBGL_ANNOTATION
+#define MBGL_ANNOTATION
+
+#include <cstdint>
+#include <vector>
+
+namespace mbgl {
+
+enum class AnnotationType : uint8_t {
+ Any = 0,
+ Point = 1 << 0,
+ Shape = 1 << 1,
+};
+
+using AnnotationID = uint32_t;
+using AnnotationIDs = std::vector<AnnotationID>;
+
+}
+
+#endif
diff --git a/include/mbgl/annotation/shape_annotation.hpp b/include/mbgl/annotation/shape_annotation.hpp
index a35b867266..dd8bf5e4d5 100644
--- a/include/mbgl/annotation/shape_annotation.hpp
+++ b/include/mbgl/annotation/shape_annotation.hpp
@@ -1,14 +1,16 @@
#ifndef MBGL_ANNOTATION_SHAPE_ANNOTATION
#define MBGL_ANNOTATION_SHAPE_ANNOTATION
-#include <mbgl/util/geo.hpp>
-#include <mbgl/map/map.hpp>
+#include <mbgl/annotation/annotation.hpp>
#include <mbgl/style/style_properties.hpp>
-#include <string>
+#include <mbgl/util/geo.hpp>
namespace mbgl {
+using AnnotationSegment = std::vector<LatLng>;
+using AnnotationSegments = std::vector<AnnotationSegment>;
+
class ShapeAnnotation {
public:
inline ShapeAnnotation(const AnnotationSegments& segments_, const StyleProperties& styleProperties_)