diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-22 13:11:25 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-22 15:27:53 -0700 |
commit | c46a8254c46acb0da3719e20e99c87b11e998da2 (patch) | |
tree | 635f8c3e3d878ff3e025a8175a3509a1ec4d6df7 /include/mbgl/annotation | |
parent | 4f509288b7c671db96555a24a4f490311adfc13a (diff) | |
download | qtlocation-mapboxgl-c46a8254c46acb0da3719e20e99c87b11e998da2.tar.gz |
[core] Style-sourced shape annotation properties
This introduces the possibility to source the type and style properties
of a shape annotation from a designated layer in the style.
Diffstat (limited to 'include/mbgl/annotation')
-rw-r--r-- | include/mbgl/annotation/shape_annotation.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/mbgl/annotation/shape_annotation.hpp b/include/mbgl/annotation/shape_annotation.hpp index 5e6a13149a..90f2a96dd0 100644 --- a/include/mbgl/annotation/shape_annotation.hpp +++ b/include/mbgl/annotation/shape_annotation.hpp @@ -15,14 +15,17 @@ using AnnotationSegments = std::vector<AnnotationSegment>; class ShapeAnnotation { public: - using Properties = mapbox::util::variant<FillPaintProperties, LinePaintProperties>; + using Properties = mapbox::util::variant< + FillPaintProperties, // creates a fill annotation + LinePaintProperties, // creates a line annotation + std::string>; // creates an annotation whose type and properties are sourced from a style layer - inline ShapeAnnotation(const AnnotationSegments& segments_, const Properties& styleProperties_) - : segments(segments_), styleProperties(styleProperties_) { + ShapeAnnotation(const AnnotationSegments& segments_, const Properties& properties_) + : segments(segments_), properties(properties_) { } const AnnotationSegments segments; - const Properties styleProperties; + const Properties properties; }; } |