From 2de89a99bc86776c8cadedc0ae9b344fb78b8217 Mon Sep 17 00:00:00 2001 From: Lauren Budorick Date: Mon, 28 Aug 2017 13:32:56 -0700 Subject: Implement icon-anchor property --- include/mbgl/style/conversion/make_property_setters.hpp | 3 ++- include/mbgl/style/layers/symbol_layer.hpp | 10 +++++++--- include/mbgl/style/types.hpp | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/mbgl/style/conversion/make_property_setters.hpp b/include/mbgl/style/conversion/make_property_setters.hpp index 9252297d75..ef96f534a9 100644 --- a/include/mbgl/style/conversion/make_property_setters.hpp +++ b/include/mbgl/style/conversion/make_property_setters.hpp @@ -45,6 +45,7 @@ auto makeLayoutPropertySetters() { result["icon-padding"] = &setProperty, &SymbolLayer::setIconPadding>; result["icon-keep-upright"] = &setProperty, &SymbolLayer::setIconKeepUpright>; result["icon-offset"] = &setProperty>, &SymbolLayer::setIconOffset>; + result["icon-anchor"] = &setProperty, &SymbolLayer::setIconAnchor>; result["icon-pitch-alignment"] = &setProperty, &SymbolLayer::setIconPitchAlignment>; result["text-pitch-alignment"] = &setProperty, &SymbolLayer::setTextPitchAlignment>; result["text-rotation-alignment"] = &setProperty, &SymbolLayer::setTextRotationAlignment>; @@ -55,7 +56,7 @@ auto makeLayoutPropertySetters() { result["text-line-height"] = &setProperty, &SymbolLayer::setTextLineHeight>; result["text-letter-spacing"] = &setProperty, &SymbolLayer::setTextLetterSpacing>; result["text-justify"] = &setProperty, &SymbolLayer::setTextJustify>; - result["text-anchor"] = &setProperty, &SymbolLayer::setTextAnchor>; + result["text-anchor"] = &setProperty, &SymbolLayer::setTextAnchor>; result["text-max-angle"] = &setProperty, &SymbolLayer::setTextMaxAngle>; result["text-rotate"] = &setProperty, &SymbolLayer::setTextRotate>; result["text-padding"] = &setProperty, &SymbolLayer::setTextPadding>; diff --git a/include/mbgl/style/layers/symbol_layer.hpp b/include/mbgl/style/layers/symbol_layer.hpp index 6e355c0057..2d5123573f 100644 --- a/include/mbgl/style/layers/symbol_layer.hpp +++ b/include/mbgl/style/layers/symbol_layer.hpp @@ -98,6 +98,10 @@ public: DataDrivenPropertyValue> getIconOffset() const; void setIconOffset(DataDrivenPropertyValue>); + static DataDrivenPropertyValue getDefaultIconAnchor(); + DataDrivenPropertyValue getIconAnchor() const; + void setIconAnchor(DataDrivenPropertyValue); + static PropertyValue getDefaultIconPitchAlignment(); PropertyValue getIconPitchAlignment() const; void setIconPitchAlignment(PropertyValue); @@ -138,9 +142,9 @@ public: DataDrivenPropertyValue getTextJustify() const; void setTextJustify(DataDrivenPropertyValue); - static DataDrivenPropertyValue getDefaultTextAnchor(); - DataDrivenPropertyValue getTextAnchor() const; - void setTextAnchor(DataDrivenPropertyValue); + static DataDrivenPropertyValue getDefaultTextAnchor(); + DataDrivenPropertyValue getTextAnchor() const; + void setTextAnchor(DataDrivenPropertyValue); static PropertyValue getDefaultTextMaxAngle(); PropertyValue getTextMaxAngle() const; diff --git a/include/mbgl/style/types.hpp b/include/mbgl/style/types.hpp index 44b16f16e7..ec7358de8c 100644 --- a/include/mbgl/style/types.hpp +++ b/include/mbgl/style/types.hpp @@ -68,7 +68,7 @@ enum class TextJustifyType : uint8_t { Right }; -enum class TextAnchorType : uint8_t { +enum class SymbolAnchorType : uint8_t { Center, Left, Right, -- cgit v1.2.1