From c46a8254c46acb0da3719e20e99c87b11e998da2 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 22 Oct 2015 13:11:25 -0700 Subject: [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. --- include/mbgl/annotation/shape_annotation.hpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'include/mbgl/annotation') 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; class ShapeAnnotation { public: - using Properties = mapbox::util::variant; + 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; }; } -- cgit v1.2.1