diff options
author | Lauren Budorick <lauren@mapbox.com> | 2017-08-23 15:03:15 -0700 |
---|---|---|
committer | Lauren Budorick <lauren@mapbox.com> | 2017-08-28 12:42:51 -0700 |
commit | be18e6a9bdf0b5cad38c4bab6fa391cff49d6dfd (patch) | |
tree | e930ceb8436646e0d6747f2b3e805bd640f2a436 /src/mbgl/style/layers/symbol_layer_properties.hpp | |
parent | c6ab20e5c69c3705422e49c3511faf3e5ab79b05 (diff) | |
download | qtlocation-mapboxgl-upstream/icon-anchor.tar.gz |
Implement icon-anchor propertyupstream/icon-anchor
Diffstat (limited to 'src/mbgl/style/layers/symbol_layer_properties.hpp')
-rw-r--r-- | src/mbgl/style/layers/symbol_layer_properties.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mbgl/style/layers/symbol_layer_properties.hpp b/src/mbgl/style/layers/symbol_layer_properties.hpp index fe6ab38e92..0d163b9fb9 100644 --- a/src/mbgl/style/layers/symbol_layer_properties.hpp +++ b/src/mbgl/style/layers/symbol_layer_properties.hpp @@ -87,6 +87,11 @@ struct IconOffset : DataDrivenLayoutProperty<std::array<float, 2>> { static std::array<float, 2> defaultValue() { return {{ 0, 0 }}; } }; +struct IconAnchor : DataDrivenLayoutProperty<SymbolAnchorType> { + static constexpr const char * key = "icon-anchor"; + static SymbolAnchorType defaultValue() { return SymbolAnchorType::Center; } +}; + struct IconPitchAlignment : LayoutProperty<AlignmentType> { static constexpr const char * key = "icon-pitch-alignment"; static AlignmentType defaultValue() { return AlignmentType::Auto; } @@ -137,9 +142,9 @@ struct TextJustify : DataDrivenLayoutProperty<TextJustifyType> { static TextJustifyType defaultValue() { return TextJustifyType::Center; } }; -struct TextAnchor : DataDrivenLayoutProperty<TextAnchorType> { +struct TextAnchor : DataDrivenLayoutProperty<SymbolAnchorType> { static constexpr const char * key = "text-anchor"; - static TextAnchorType defaultValue() { return TextAnchorType::Center; } + static SymbolAnchorType defaultValue() { return SymbolAnchorType::Center; } }; struct TextMaxAngle : LayoutProperty<float> { @@ -259,6 +264,7 @@ class SymbolLayoutProperties : public Properties< IconPadding, IconKeepUpright, IconOffset, + IconAnchor, IconPitchAlignment, TextPitchAlignment, TextRotationAlignment, |