summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/symbol_layer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/layers/symbol_layer.cpp')
-rw-r--r--src/mbgl/style/layers/symbol_layer.cpp1104
1 files changed, 552 insertions, 552 deletions
diff --git a/src/mbgl/style/layers/symbol_layer.cpp b/src/mbgl/style/layers/symbol_layer.cpp
index 0567c224bd..1740e5bb2e 100644
--- a/src/mbgl/style/layers/symbol_layer.cpp
+++ b/src/mbgl/style/layers/symbol_layer.cpp
@@ -61,131 +61,163 @@ void SymbolLayer::Impl::stringifyLayout(rapidjson::Writer<rapidjson::StringBuffe
// Layout properties
-PropertyValue<SymbolPlacementType> SymbolLayer::getDefaultSymbolPlacement() {
- return SymbolPlacement::defaultValue();
+PropertyValue<bool> SymbolLayer::getDefaultIconAllowOverlap() {
+ return IconAllowOverlap::defaultValue();
}
-const PropertyValue<SymbolPlacementType>& SymbolLayer::getSymbolPlacement() const {
- return impl().layout.get<SymbolPlacement>();
+const PropertyValue<bool>& SymbolLayer::getIconAllowOverlap() const {
+ return impl().layout.get<IconAllowOverlap>();
}
-void SymbolLayer::setSymbolPlacement(const PropertyValue<SymbolPlacementType>& value) {
- if (value == getSymbolPlacement())
+void SymbolLayer::setIconAllowOverlap(const PropertyValue<bool>& value) {
+ if (value == getIconAllowOverlap())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<SymbolPlacement>() = value;
+ impl_->layout.get<IconAllowOverlap>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<float> SymbolLayer::getDefaultSymbolSpacing() {
- return SymbolSpacing::defaultValue();
+PropertyValue<SymbolAnchorType> SymbolLayer::getDefaultIconAnchor() {
+ return IconAnchor::defaultValue();
}
-const PropertyValue<float>& SymbolLayer::getSymbolSpacing() const {
- return impl().layout.get<SymbolSpacing>();
+const PropertyValue<SymbolAnchorType>& SymbolLayer::getIconAnchor() const {
+ return impl().layout.get<IconAnchor>();
}
-void SymbolLayer::setSymbolSpacing(const PropertyValue<float>& value) {
- if (value == getSymbolSpacing())
+void SymbolLayer::setIconAnchor(const PropertyValue<SymbolAnchorType>& value) {
+ if (value == getIconAnchor())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<SymbolSpacing>() = value;
+ impl_->layout.get<IconAnchor>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<bool> SymbolLayer::getDefaultSymbolAvoidEdges() {
- return SymbolAvoidEdges::defaultValue();
+PropertyValue<bool> SymbolLayer::getDefaultIconIgnorePlacement() {
+ return IconIgnorePlacement::defaultValue();
}
-const PropertyValue<bool>& SymbolLayer::getSymbolAvoidEdges() const {
- return impl().layout.get<SymbolAvoidEdges>();
+const PropertyValue<bool>& SymbolLayer::getIconIgnorePlacement() const {
+ return impl().layout.get<IconIgnorePlacement>();
}
-void SymbolLayer::setSymbolAvoidEdges(const PropertyValue<bool>& value) {
- if (value == getSymbolAvoidEdges())
+void SymbolLayer::setIconIgnorePlacement(const PropertyValue<bool>& value) {
+ if (value == getIconIgnorePlacement())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<SymbolAvoidEdges>() = value;
+ impl_->layout.get<IconIgnorePlacement>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<float> SymbolLayer::getDefaultSymbolSortKey() {
- return SymbolSortKey::defaultValue();
+PropertyValue<std::string> SymbolLayer::getDefaultIconImage() {
+ return IconImage::defaultValue();
}
-const PropertyValue<float>& SymbolLayer::getSymbolSortKey() const {
- return impl().layout.get<SymbolSortKey>();
+const PropertyValue<std::string>& SymbolLayer::getIconImage() const {
+ return impl().layout.get<IconImage>();
}
-void SymbolLayer::setSymbolSortKey(const PropertyValue<float>& value) {
- if (value == getSymbolSortKey())
+void SymbolLayer::setIconImage(const PropertyValue<std::string>& value) {
+ if (value == getIconImage())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<SymbolSortKey>() = value;
+ impl_->layout.get<IconImage>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<SymbolZOrderType> SymbolLayer::getDefaultSymbolZOrder() {
- return SymbolZOrder::defaultValue();
+PropertyValue<bool> SymbolLayer::getDefaultIconKeepUpright() {
+ return IconKeepUpright::defaultValue();
}
-const PropertyValue<SymbolZOrderType>& SymbolLayer::getSymbolZOrder() const {
- return impl().layout.get<SymbolZOrder>();
+const PropertyValue<bool>& SymbolLayer::getIconKeepUpright() const {
+ return impl().layout.get<IconKeepUpright>();
}
-void SymbolLayer::setSymbolZOrder(const PropertyValue<SymbolZOrderType>& value) {
- if (value == getSymbolZOrder())
+void SymbolLayer::setIconKeepUpright(const PropertyValue<bool>& value) {
+ if (value == getIconKeepUpright())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<SymbolZOrder>() = value;
+ impl_->layout.get<IconKeepUpright>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<bool> SymbolLayer::getDefaultIconAllowOverlap() {
- return IconAllowOverlap::defaultValue();
+PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultIconOffset() {
+ return IconOffset::defaultValue();
}
-const PropertyValue<bool>& SymbolLayer::getIconAllowOverlap() const {
- return impl().layout.get<IconAllowOverlap>();
+const PropertyValue<std::array<float, 2>>& SymbolLayer::getIconOffset() const {
+ return impl().layout.get<IconOffset>();
}
-void SymbolLayer::setIconAllowOverlap(const PropertyValue<bool>& value) {
- if (value == getIconAllowOverlap())
+void SymbolLayer::setIconOffset(const PropertyValue<std::array<float, 2>>& value) {
+ if (value == getIconOffset())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<IconAllowOverlap>() = value;
+ impl_->layout.get<IconOffset>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<bool> SymbolLayer::getDefaultIconIgnorePlacement() {
- return IconIgnorePlacement::defaultValue();
+PropertyValue<bool> SymbolLayer::getDefaultIconOptional() {
+ return IconOptional::defaultValue();
}
-const PropertyValue<bool>& SymbolLayer::getIconIgnorePlacement() const {
- return impl().layout.get<IconIgnorePlacement>();
+const PropertyValue<bool>& SymbolLayer::getIconOptional() const {
+ return impl().layout.get<IconOptional>();
}
-void SymbolLayer::setIconIgnorePlacement(const PropertyValue<bool>& value) {
- if (value == getIconIgnorePlacement())
+void SymbolLayer::setIconOptional(const PropertyValue<bool>& value) {
+ if (value == getIconOptional())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<IconIgnorePlacement>() = value;
+ impl_->layout.get<IconOptional>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<bool> SymbolLayer::getDefaultIconOptional() {
- return IconOptional::defaultValue();
+PropertyValue<float> SymbolLayer::getDefaultIconPadding() {
+ return IconPadding::defaultValue();
}
-const PropertyValue<bool>& SymbolLayer::getIconOptional() const {
- return impl().layout.get<IconOptional>();
+const PropertyValue<float>& SymbolLayer::getIconPadding() const {
+ return impl().layout.get<IconPadding>();
}
-void SymbolLayer::setIconOptional(const PropertyValue<bool>& value) {
- if (value == getIconOptional())
+void SymbolLayer::setIconPadding(const PropertyValue<float>& value) {
+ if (value == getIconPadding())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<IconOptional>() = value;
+ impl_->layout.get<IconPadding>() = value;
+ baseImpl = std::move(impl_);
+ observer->onLayerChanged(*this);
+}
+PropertyValue<AlignmentType> SymbolLayer::getDefaultIconPitchAlignment() {
+ return IconPitchAlignment::defaultValue();
+}
+
+const PropertyValue<AlignmentType>& SymbolLayer::getIconPitchAlignment() const {
+ return impl().layout.get<IconPitchAlignment>();
+}
+
+void SymbolLayer::setIconPitchAlignment(const PropertyValue<AlignmentType>& value) {
+ if (value == getIconPitchAlignment())
+ return;
+ auto impl_ = mutableImpl();
+ impl_->layout.get<IconPitchAlignment>() = value;
+ baseImpl = std::move(impl_);
+ observer->onLayerChanged(*this);
+}
+PropertyValue<float> SymbolLayer::getDefaultIconRotate() {
+ return IconRotate::defaultValue();
+}
+
+const PropertyValue<float>& SymbolLayer::getIconRotate() const {
+ return impl().layout.get<IconRotate>();
+}
+
+void SymbolLayer::setIconRotate(const PropertyValue<float>& value) {
+ if (value == getIconRotate())
+ return;
+ auto impl_ = mutableImpl();
+ impl_->layout.get<IconRotate>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
@@ -253,147 +285,115 @@ void SymbolLayer::setIconTextFitPadding(const PropertyValue<std::array<float, 4>
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<std::string> SymbolLayer::getDefaultIconImage() {
- return IconImage::defaultValue();
-}
-
-const PropertyValue<std::string>& SymbolLayer::getIconImage() const {
- return impl().layout.get<IconImage>();
-}
-
-void SymbolLayer::setIconImage(const PropertyValue<std::string>& value) {
- if (value == getIconImage())
- return;
- auto impl_ = mutableImpl();
- impl_->layout.get<IconImage>() = value;
- baseImpl = std::move(impl_);
- observer->onLayerChanged(*this);
-}
-PropertyValue<float> SymbolLayer::getDefaultIconRotate() {
- return IconRotate::defaultValue();
-}
-
-const PropertyValue<float>& SymbolLayer::getIconRotate() const {
- return impl().layout.get<IconRotate>();
-}
-
-void SymbolLayer::setIconRotate(const PropertyValue<float>& value) {
- if (value == getIconRotate())
- return;
- auto impl_ = mutableImpl();
- impl_->layout.get<IconRotate>() = value;
- baseImpl = std::move(impl_);
- observer->onLayerChanged(*this);
-}
-PropertyValue<float> SymbolLayer::getDefaultIconPadding() {
- return IconPadding::defaultValue();
+PropertyValue<bool> SymbolLayer::getDefaultSymbolAvoidEdges() {
+ return SymbolAvoidEdges::defaultValue();
}
-const PropertyValue<float>& SymbolLayer::getIconPadding() const {
- return impl().layout.get<IconPadding>();
+const PropertyValue<bool>& SymbolLayer::getSymbolAvoidEdges() const {
+ return impl().layout.get<SymbolAvoidEdges>();
}
-void SymbolLayer::setIconPadding(const PropertyValue<float>& value) {
- if (value == getIconPadding())
+void SymbolLayer::setSymbolAvoidEdges(const PropertyValue<bool>& value) {
+ if (value == getSymbolAvoidEdges())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<IconPadding>() = value;
+ impl_->layout.get<SymbolAvoidEdges>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<bool> SymbolLayer::getDefaultIconKeepUpright() {
- return IconKeepUpright::defaultValue();
+PropertyValue<SymbolPlacementType> SymbolLayer::getDefaultSymbolPlacement() {
+ return SymbolPlacement::defaultValue();
}
-const PropertyValue<bool>& SymbolLayer::getIconKeepUpright() const {
- return impl().layout.get<IconKeepUpright>();
+const PropertyValue<SymbolPlacementType>& SymbolLayer::getSymbolPlacement() const {
+ return impl().layout.get<SymbolPlacement>();
}
-void SymbolLayer::setIconKeepUpright(const PropertyValue<bool>& value) {
- if (value == getIconKeepUpright())
+void SymbolLayer::setSymbolPlacement(const PropertyValue<SymbolPlacementType>& value) {
+ if (value == getSymbolPlacement())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<IconKeepUpright>() = value;
+ impl_->layout.get<SymbolPlacement>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultIconOffset() {
- return IconOffset::defaultValue();
+PropertyValue<float> SymbolLayer::getDefaultSymbolSortKey() {
+ return SymbolSortKey::defaultValue();
}
-const PropertyValue<std::array<float, 2>>& SymbolLayer::getIconOffset() const {
- return impl().layout.get<IconOffset>();
+const PropertyValue<float>& SymbolLayer::getSymbolSortKey() const {
+ return impl().layout.get<SymbolSortKey>();
}
-void SymbolLayer::setIconOffset(const PropertyValue<std::array<float, 2>>& value) {
- if (value == getIconOffset())
+void SymbolLayer::setSymbolSortKey(const PropertyValue<float>& value) {
+ if (value == getSymbolSortKey())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<IconOffset>() = value;
+ impl_->layout.get<SymbolSortKey>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<SymbolAnchorType> SymbolLayer::getDefaultIconAnchor() {
- return IconAnchor::defaultValue();
+PropertyValue<float> SymbolLayer::getDefaultSymbolSpacing() {
+ return SymbolSpacing::defaultValue();
}
-const PropertyValue<SymbolAnchorType>& SymbolLayer::getIconAnchor() const {
- return impl().layout.get<IconAnchor>();
+const PropertyValue<float>& SymbolLayer::getSymbolSpacing() const {
+ return impl().layout.get<SymbolSpacing>();
}
-void SymbolLayer::setIconAnchor(const PropertyValue<SymbolAnchorType>& value) {
- if (value == getIconAnchor())
+void SymbolLayer::setSymbolSpacing(const PropertyValue<float>& value) {
+ if (value == getSymbolSpacing())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<IconAnchor>() = value;
+ impl_->layout.get<SymbolSpacing>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<AlignmentType> SymbolLayer::getDefaultIconPitchAlignment() {
- return IconPitchAlignment::defaultValue();
+PropertyValue<SymbolZOrderType> SymbolLayer::getDefaultSymbolZOrder() {
+ return SymbolZOrder::defaultValue();
}
-const PropertyValue<AlignmentType>& SymbolLayer::getIconPitchAlignment() const {
- return impl().layout.get<IconPitchAlignment>();
+const PropertyValue<SymbolZOrderType>& SymbolLayer::getSymbolZOrder() const {
+ return impl().layout.get<SymbolZOrder>();
}
-void SymbolLayer::setIconPitchAlignment(const PropertyValue<AlignmentType>& value) {
- if (value == getIconPitchAlignment())
+void SymbolLayer::setSymbolZOrder(const PropertyValue<SymbolZOrderType>& value) {
+ if (value == getSymbolZOrder())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<IconPitchAlignment>() = value;
+ impl_->layout.get<SymbolZOrder>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<AlignmentType> SymbolLayer::getDefaultTextPitchAlignment() {
- return TextPitchAlignment::defaultValue();
+PropertyValue<bool> SymbolLayer::getDefaultTextAllowOverlap() {
+ return TextAllowOverlap::defaultValue();
}
-const PropertyValue<AlignmentType>& SymbolLayer::getTextPitchAlignment() const {
- return impl().layout.get<TextPitchAlignment>();
+const PropertyValue<bool>& SymbolLayer::getTextAllowOverlap() const {
+ return impl().layout.get<TextAllowOverlap>();
}
-void SymbolLayer::setTextPitchAlignment(const PropertyValue<AlignmentType>& value) {
- if (value == getTextPitchAlignment())
+void SymbolLayer::setTextAllowOverlap(const PropertyValue<bool>& value) {
+ if (value == getTextAllowOverlap())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextPitchAlignment>() = value;
+ impl_->layout.get<TextAllowOverlap>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<AlignmentType> SymbolLayer::getDefaultTextRotationAlignment() {
- return TextRotationAlignment::defaultValue();
+PropertyValue<SymbolAnchorType> SymbolLayer::getDefaultTextAnchor() {
+ return TextAnchor::defaultValue();
}
-const PropertyValue<AlignmentType>& SymbolLayer::getTextRotationAlignment() const {
- return impl().layout.get<TextRotationAlignment>();
+const PropertyValue<SymbolAnchorType>& SymbolLayer::getTextAnchor() const {
+ return impl().layout.get<TextAnchor>();
}
-void SymbolLayer::setTextRotationAlignment(const PropertyValue<AlignmentType>& value) {
- if (value == getTextRotationAlignment())
+void SymbolLayer::setTextAnchor(const PropertyValue<SymbolAnchorType>& value) {
+ if (value == getTextAnchor())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextRotationAlignment>() = value;
+ impl_->layout.get<TextAnchor>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
@@ -429,51 +429,51 @@ void SymbolLayer::setTextFont(const PropertyValue<std::vector<std::string>>& val
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<float> SymbolLayer::getDefaultTextSize() {
- return TextSize::defaultValue();
+PropertyValue<bool> SymbolLayer::getDefaultTextIgnorePlacement() {
+ return TextIgnorePlacement::defaultValue();
}
-const PropertyValue<float>& SymbolLayer::getTextSize() const {
- return impl().layout.get<TextSize>();
+const PropertyValue<bool>& SymbolLayer::getTextIgnorePlacement() const {
+ return impl().layout.get<TextIgnorePlacement>();
}
-void SymbolLayer::setTextSize(const PropertyValue<float>& value) {
- if (value == getTextSize())
+void SymbolLayer::setTextIgnorePlacement(const PropertyValue<bool>& value) {
+ if (value == getTextIgnorePlacement())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextSize>() = value;
+ impl_->layout.get<TextIgnorePlacement>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<float> SymbolLayer::getDefaultTextMaxWidth() {
- return TextMaxWidth::defaultValue();
+PropertyValue<TextJustifyType> SymbolLayer::getDefaultTextJustify() {
+ return TextJustify::defaultValue();
}
-const PropertyValue<float>& SymbolLayer::getTextMaxWidth() const {
- return impl().layout.get<TextMaxWidth>();
+const PropertyValue<TextJustifyType>& SymbolLayer::getTextJustify() const {
+ return impl().layout.get<TextJustify>();
}
-void SymbolLayer::setTextMaxWidth(const PropertyValue<float>& value) {
- if (value == getTextMaxWidth())
+void SymbolLayer::setTextJustify(const PropertyValue<TextJustifyType>& value) {
+ if (value == getTextJustify())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextMaxWidth>() = value;
+ impl_->layout.get<TextJustify>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<float> SymbolLayer::getDefaultTextLineHeight() {
- return TextLineHeight::defaultValue();
+PropertyValue<bool> SymbolLayer::getDefaultTextKeepUpright() {
+ return TextKeepUpright::defaultValue();
}
-const PropertyValue<float>& SymbolLayer::getTextLineHeight() const {
- return impl().layout.get<TextLineHeight>();
+const PropertyValue<bool>& SymbolLayer::getTextKeepUpright() const {
+ return impl().layout.get<TextKeepUpright>();
}
-void SymbolLayer::setTextLineHeight(const PropertyValue<float>& value) {
- if (value == getTextLineHeight())
+void SymbolLayer::setTextKeepUpright(const PropertyValue<bool>& value) {
+ if (value == getTextKeepUpright())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextLineHeight>() = value;
+ impl_->layout.get<TextKeepUpright>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
@@ -493,99 +493,83 @@ void SymbolLayer::setTextLetterSpacing(const PropertyValue<float>& value) {
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<TextJustifyType> SymbolLayer::getDefaultTextJustify() {
- return TextJustify::defaultValue();
-}
-
-const PropertyValue<TextJustifyType>& SymbolLayer::getTextJustify() const {
- return impl().layout.get<TextJustify>();
-}
-
-void SymbolLayer::setTextJustify(const PropertyValue<TextJustifyType>& value) {
- if (value == getTextJustify())
- return;
- auto impl_ = mutableImpl();
- impl_->layout.get<TextJustify>() = value;
- baseImpl = std::move(impl_);
- observer->onLayerChanged(*this);
-}
-PropertyValue<float> SymbolLayer::getDefaultTextRadialOffset() {
- return TextRadialOffset::defaultValue();
+PropertyValue<float> SymbolLayer::getDefaultTextLineHeight() {
+ return TextLineHeight::defaultValue();
}
-const PropertyValue<float>& SymbolLayer::getTextRadialOffset() const {
- return impl().layout.get<TextRadialOffset>();
+const PropertyValue<float>& SymbolLayer::getTextLineHeight() const {
+ return impl().layout.get<TextLineHeight>();
}
-void SymbolLayer::setTextRadialOffset(const PropertyValue<float>& value) {
- if (value == getTextRadialOffset())
+void SymbolLayer::setTextLineHeight(const PropertyValue<float>& value) {
+ if (value == getTextLineHeight())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextRadialOffset>() = value;
+ impl_->layout.get<TextLineHeight>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<std::vector<TextVariableAnchorType>> SymbolLayer::getDefaultTextVariableAnchor() {
- return TextVariableAnchor::defaultValue();
+PropertyValue<float> SymbolLayer::getDefaultTextMaxAngle() {
+ return TextMaxAngle::defaultValue();
}
-const PropertyValue<std::vector<TextVariableAnchorType>>& SymbolLayer::getTextVariableAnchor() const {
- return impl().layout.get<TextVariableAnchor>();
+const PropertyValue<float>& SymbolLayer::getTextMaxAngle() const {
+ return impl().layout.get<TextMaxAngle>();
}
-void SymbolLayer::setTextVariableAnchor(const PropertyValue<std::vector<TextVariableAnchorType>>& value) {
- if (value == getTextVariableAnchor())
+void SymbolLayer::setTextMaxAngle(const PropertyValue<float>& value) {
+ if (value == getTextMaxAngle())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextVariableAnchor>() = value;
+ impl_->layout.get<TextMaxAngle>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<SymbolAnchorType> SymbolLayer::getDefaultTextAnchor() {
- return TextAnchor::defaultValue();
+PropertyValue<float> SymbolLayer::getDefaultTextMaxWidth() {
+ return TextMaxWidth::defaultValue();
}
-const PropertyValue<SymbolAnchorType>& SymbolLayer::getTextAnchor() const {
- return impl().layout.get<TextAnchor>();
+const PropertyValue<float>& SymbolLayer::getTextMaxWidth() const {
+ return impl().layout.get<TextMaxWidth>();
}
-void SymbolLayer::setTextAnchor(const PropertyValue<SymbolAnchorType>& value) {
- if (value == getTextAnchor())
+void SymbolLayer::setTextMaxWidth(const PropertyValue<float>& value) {
+ if (value == getTextMaxWidth())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextAnchor>() = value;
+ impl_->layout.get<TextMaxWidth>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<float> SymbolLayer::getDefaultTextMaxAngle() {
- return TextMaxAngle::defaultValue();
+PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultTextOffset() {
+ return TextOffset::defaultValue();
}
-const PropertyValue<float>& SymbolLayer::getTextMaxAngle() const {
- return impl().layout.get<TextMaxAngle>();
+const PropertyValue<std::array<float, 2>>& SymbolLayer::getTextOffset() const {
+ return impl().layout.get<TextOffset>();
}
-void SymbolLayer::setTextMaxAngle(const PropertyValue<float>& value) {
- if (value == getTextMaxAngle())
+void SymbolLayer::setTextOffset(const PropertyValue<std::array<float, 2>>& value) {
+ if (value == getTextOffset())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextMaxAngle>() = value;
+ impl_->layout.get<TextOffset>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<float> SymbolLayer::getDefaultTextRotate() {
- return TextRotate::defaultValue();
+PropertyValue<bool> SymbolLayer::getDefaultTextOptional() {
+ return TextOptional::defaultValue();
}
-const PropertyValue<float>& SymbolLayer::getTextRotate() const {
- return impl().layout.get<TextRotate>();
+const PropertyValue<bool>& SymbolLayer::getTextOptional() const {
+ return impl().layout.get<TextOptional>();
}
-void SymbolLayer::setTextRotate(const PropertyValue<float>& value) {
- if (value == getTextRotate())
+void SymbolLayer::setTextOptional(const PropertyValue<bool>& value) {
+ if (value == getTextOptional())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextRotate>() = value;
+ impl_->layout.get<TextOptional>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
@@ -605,131 +589,120 @@ void SymbolLayer::setTextPadding(const PropertyValue<float>& value) {
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<bool> SymbolLayer::getDefaultTextKeepUpright() {
- return TextKeepUpright::defaultValue();
+PropertyValue<AlignmentType> SymbolLayer::getDefaultTextPitchAlignment() {
+ return TextPitchAlignment::defaultValue();
}
-const PropertyValue<bool>& SymbolLayer::getTextKeepUpright() const {
- return impl().layout.get<TextKeepUpright>();
+const PropertyValue<AlignmentType>& SymbolLayer::getTextPitchAlignment() const {
+ return impl().layout.get<TextPitchAlignment>();
}
-void SymbolLayer::setTextKeepUpright(const PropertyValue<bool>& value) {
- if (value == getTextKeepUpright())
+void SymbolLayer::setTextPitchAlignment(const PropertyValue<AlignmentType>& value) {
+ if (value == getTextPitchAlignment())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextKeepUpright>() = value;
+ impl_->layout.get<TextPitchAlignment>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<TextTransformType> SymbolLayer::getDefaultTextTransform() {
- return TextTransform::defaultValue();
+PropertyValue<float> SymbolLayer::getDefaultTextRadialOffset() {
+ return TextRadialOffset::defaultValue();
}
-const PropertyValue<TextTransformType>& SymbolLayer::getTextTransform() const {
- return impl().layout.get<TextTransform>();
+const PropertyValue<float>& SymbolLayer::getTextRadialOffset() const {
+ return impl().layout.get<TextRadialOffset>();
}
-void SymbolLayer::setTextTransform(const PropertyValue<TextTransformType>& value) {
- if (value == getTextTransform())
+void SymbolLayer::setTextRadialOffset(const PropertyValue<float>& value) {
+ if (value == getTextRadialOffset())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextTransform>() = value;
+ impl_->layout.get<TextRadialOffset>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultTextOffset() {
- return TextOffset::defaultValue();
+PropertyValue<float> SymbolLayer::getDefaultTextRotate() {
+ return TextRotate::defaultValue();
}
-const PropertyValue<std::array<float, 2>>& SymbolLayer::getTextOffset() const {
- return impl().layout.get<TextOffset>();
+const PropertyValue<float>& SymbolLayer::getTextRotate() const {
+ return impl().layout.get<TextRotate>();
}
-void SymbolLayer::setTextOffset(const PropertyValue<std::array<float, 2>>& value) {
- if (value == getTextOffset())
+void SymbolLayer::setTextRotate(const PropertyValue<float>& value) {
+ if (value == getTextRotate())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextOffset>() = value;
+ impl_->layout.get<TextRotate>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<bool> SymbolLayer::getDefaultTextAllowOverlap() {
- return TextAllowOverlap::defaultValue();
+PropertyValue<AlignmentType> SymbolLayer::getDefaultTextRotationAlignment() {
+ return TextRotationAlignment::defaultValue();
}
-const PropertyValue<bool>& SymbolLayer::getTextAllowOverlap() const {
- return impl().layout.get<TextAllowOverlap>();
+const PropertyValue<AlignmentType>& SymbolLayer::getTextRotationAlignment() const {
+ return impl().layout.get<TextRotationAlignment>();
}
-void SymbolLayer::setTextAllowOverlap(const PropertyValue<bool>& value) {
- if (value == getTextAllowOverlap())
+void SymbolLayer::setTextRotationAlignment(const PropertyValue<AlignmentType>& value) {
+ if (value == getTextRotationAlignment())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextAllowOverlap>() = value;
+ impl_->layout.get<TextRotationAlignment>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<bool> SymbolLayer::getDefaultTextIgnorePlacement() {
- return TextIgnorePlacement::defaultValue();
+PropertyValue<float> SymbolLayer::getDefaultTextSize() {
+ return TextSize::defaultValue();
}
-const PropertyValue<bool>& SymbolLayer::getTextIgnorePlacement() const {
- return impl().layout.get<TextIgnorePlacement>();
+const PropertyValue<float>& SymbolLayer::getTextSize() const {
+ return impl().layout.get<TextSize>();
}
-void SymbolLayer::setTextIgnorePlacement(const PropertyValue<bool>& value) {
- if (value == getTextIgnorePlacement())
+void SymbolLayer::setTextSize(const PropertyValue<float>& value) {
+ if (value == getTextSize())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextIgnorePlacement>() = value;
+ impl_->layout.get<TextSize>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-PropertyValue<bool> SymbolLayer::getDefaultTextOptional() {
- return TextOptional::defaultValue();
+PropertyValue<TextTransformType> SymbolLayer::getDefaultTextTransform() {
+ return TextTransform::defaultValue();
}
-const PropertyValue<bool>& SymbolLayer::getTextOptional() const {
- return impl().layout.get<TextOptional>();
+const PropertyValue<TextTransformType>& SymbolLayer::getTextTransform() const {
+ return impl().layout.get<TextTransform>();
}
-void SymbolLayer::setTextOptional(const PropertyValue<bool>& value) {
- if (value == getTextOptional())
+void SymbolLayer::setTextTransform(const PropertyValue<TextTransformType>& value) {
+ if (value == getTextTransform())
return;
auto impl_ = mutableImpl();
- impl_->layout.get<TextOptional>() = value;
+ impl_->layout.get<TextTransform>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-
-// Paint properties
-
-PropertyValue<float> SymbolLayer::getDefaultIconOpacity() {
- return { 1 };
+PropertyValue<std::vector<TextVariableAnchorType>> SymbolLayer::getDefaultTextVariableAnchor() {
+ return TextVariableAnchor::defaultValue();
}
-const PropertyValue<float>& SymbolLayer::getIconOpacity() const {
- return impl().paint.template get<IconOpacity>().value;
+const PropertyValue<std::vector<TextVariableAnchorType>>& SymbolLayer::getTextVariableAnchor() const {
+ return impl().layout.get<TextVariableAnchor>();
}
-void SymbolLayer::setIconOpacity(const PropertyValue<float>& value) {
- if (value == getIconOpacity())
+void SymbolLayer::setTextVariableAnchor(const PropertyValue<std::vector<TextVariableAnchorType>>& value) {
+ if (value == getTextVariableAnchor())
return;
auto impl_ = mutableImpl();
- impl_->paint.template get<IconOpacity>().value = value;
+ impl_->layout.get<TextVariableAnchor>() = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-void SymbolLayer::setIconOpacityTransition(const TransitionOptions& options) {
- auto impl_ = mutableImpl();
- impl_->paint.template get<IconOpacity>().options = options;
- baseImpl = std::move(impl_);
-}
-
-TransitionOptions SymbolLayer::getIconOpacityTransition() const {
- return impl().paint.template get<IconOpacity>().options;
-}
+// Paint properties
PropertyValue<Color> SymbolLayer::getDefaultIconColor() {
return { Color::black() };
@@ -758,6 +731,33 @@ TransitionOptions SymbolLayer::getIconColorTransition() const {
return impl().paint.template get<IconColor>().options;
}
+PropertyValue<float> SymbolLayer::getDefaultIconHaloBlur() {
+ return { 0 };
+}
+
+const PropertyValue<float>& SymbolLayer::getIconHaloBlur() const {
+ return impl().paint.template get<IconHaloBlur>().value;
+}
+
+void SymbolLayer::setIconHaloBlur(const PropertyValue<float>& value) {
+ if (value == getIconHaloBlur())
+ return;
+ auto impl_ = mutableImpl();
+ impl_->paint.template get<IconHaloBlur>().value = value;
+ baseImpl = std::move(impl_);
+ observer->onLayerChanged(*this);
+}
+
+void SymbolLayer::setIconHaloBlurTransition(const TransitionOptions& options) {
+ auto impl_ = mutableImpl();
+ impl_->paint.template get<IconHaloBlur>().options = options;
+ baseImpl = std::move(impl_);
+}
+
+TransitionOptions SymbolLayer::getIconHaloBlurTransition() const {
+ return impl().paint.template get<IconHaloBlur>().options;
+}
+
PropertyValue<Color> SymbolLayer::getDefaultIconHaloColor() {
return { {} };
}
@@ -812,31 +812,31 @@ TransitionOptions SymbolLayer::getIconHaloWidthTransition() const {
return impl().paint.template get<IconHaloWidth>().options;
}
-PropertyValue<float> SymbolLayer::getDefaultIconHaloBlur() {
- return { 0 };
+PropertyValue<float> SymbolLayer::getDefaultIconOpacity() {
+ return { 1 };
}
-const PropertyValue<float>& SymbolLayer::getIconHaloBlur() const {
- return impl().paint.template get<IconHaloBlur>().value;
+const PropertyValue<float>& SymbolLayer::getIconOpacity() const {
+ return impl().paint.template get<IconOpacity>().value;
}
-void SymbolLayer::setIconHaloBlur(const PropertyValue<float>& value) {
- if (value == getIconHaloBlur())
+void SymbolLayer::setIconOpacity(const PropertyValue<float>& value) {
+ if (value == getIconOpacity())
return;
auto impl_ = mutableImpl();
- impl_->paint.template get<IconHaloBlur>().value = value;
+ impl_->paint.template get<IconOpacity>().value = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-void SymbolLayer::setIconHaloBlurTransition(const TransitionOptions& options) {
+void SymbolLayer::setIconOpacityTransition(const TransitionOptions& options) {
auto impl_ = mutableImpl();
- impl_->paint.template get<IconHaloBlur>().options = options;
+ impl_->paint.template get<IconOpacity>().options = options;
baseImpl = std::move(impl_);
}
-TransitionOptions SymbolLayer::getIconHaloBlurTransition() const {
- return impl().paint.template get<IconHaloBlur>().options;
+TransitionOptions SymbolLayer::getIconOpacityTransition() const {
+ return impl().paint.template get<IconOpacity>().options;
}
PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultIconTranslate() {
@@ -893,58 +893,58 @@ TransitionOptions SymbolLayer::getIconTranslateAnchorTransition() const {
return impl().paint.template get<IconTranslateAnchor>().options;
}
-PropertyValue<float> SymbolLayer::getDefaultTextOpacity() {
- return { 1 };
+PropertyValue<Color> SymbolLayer::getDefaultTextColor() {
+ return { Color::black() };
}
-const PropertyValue<float>& SymbolLayer::getTextOpacity() const {
- return impl().paint.template get<TextOpacity>().value;
+const PropertyValue<Color>& SymbolLayer::getTextColor() const {
+ return impl().paint.template get<TextColor>().value;
}
-void SymbolLayer::setTextOpacity(const PropertyValue<float>& value) {
- if (value == getTextOpacity())
+void SymbolLayer::setTextColor(const PropertyValue<Color>& value) {
+ if (value == getTextColor())
return;
auto impl_ = mutableImpl();
- impl_->paint.template get<TextOpacity>().value = value;
+ impl_->paint.template get<TextColor>().value = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-void SymbolLayer::setTextOpacityTransition(const TransitionOptions& options) {
+void SymbolLayer::setTextColorTransition(const TransitionOptions& options) {
auto impl_ = mutableImpl();
- impl_->paint.template get<TextOpacity>().options = options;
+ impl_->paint.template get<TextColor>().options = options;
baseImpl = std::move(impl_);
}
-TransitionOptions SymbolLayer::getTextOpacityTransition() const {
- return impl().paint.template get<TextOpacity>().options;
+TransitionOptions SymbolLayer::getTextColorTransition() const {
+ return impl().paint.template get<TextColor>().options;
}
-PropertyValue<Color> SymbolLayer::getDefaultTextColor() {
- return { Color::black() };
+PropertyValue<float> SymbolLayer::getDefaultTextHaloBlur() {
+ return { 0 };
}
-const PropertyValue<Color>& SymbolLayer::getTextColor() const {
- return impl().paint.template get<TextColor>().value;
+const PropertyValue<float>& SymbolLayer::getTextHaloBlur() const {
+ return impl().paint.template get<TextHaloBlur>().value;
}
-void SymbolLayer::setTextColor(const PropertyValue<Color>& value) {
- if (value == getTextColor())
+void SymbolLayer::setTextHaloBlur(const PropertyValue<float>& value) {
+ if (value == getTextHaloBlur())
return;
auto impl_ = mutableImpl();
- impl_->paint.template get<TextColor>().value = value;
+ impl_->paint.template get<TextHaloBlur>().value = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-void SymbolLayer::setTextColorTransition(const TransitionOptions& options) {
+void SymbolLayer::setTextHaloBlurTransition(const TransitionOptions& options) {
auto impl_ = mutableImpl();
- impl_->paint.template get<TextColor>().options = options;
+ impl_->paint.template get<TextHaloBlur>().options = options;
baseImpl = std::move(impl_);
}
-TransitionOptions SymbolLayer::getTextColorTransition() const {
- return impl().paint.template get<TextColor>().options;
+TransitionOptions SymbolLayer::getTextHaloBlurTransition() const {
+ return impl().paint.template get<TextHaloBlur>().options;
}
PropertyValue<Color> SymbolLayer::getDefaultTextHaloColor() {
@@ -1001,31 +1001,31 @@ TransitionOptions SymbolLayer::getTextHaloWidthTransition() const {
return impl().paint.template get<TextHaloWidth>().options;
}
-PropertyValue<float> SymbolLayer::getDefaultTextHaloBlur() {
- return { 0 };
+PropertyValue<float> SymbolLayer::getDefaultTextOpacity() {
+ return { 1 };
}
-const PropertyValue<float>& SymbolLayer::getTextHaloBlur() const {
- return impl().paint.template get<TextHaloBlur>().value;
+const PropertyValue<float>& SymbolLayer::getTextOpacity() const {
+ return impl().paint.template get<TextOpacity>().value;
}
-void SymbolLayer::setTextHaloBlur(const PropertyValue<float>& value) {
- if (value == getTextHaloBlur())
+void SymbolLayer::setTextOpacity(const PropertyValue<float>& value) {
+ if (value == getTextOpacity())
return;
auto impl_ = mutableImpl();
- impl_->paint.template get<TextHaloBlur>().value = value;
+ impl_->paint.template get<TextOpacity>().value = value;
baseImpl = std::move(impl_);
observer->onLayerChanged(*this);
}
-void SymbolLayer::setTextHaloBlurTransition(const TransitionOptions& options) {
+void SymbolLayer::setTextOpacityTransition(const TransitionOptions& options) {
auto impl_ = mutableImpl();
- impl_->paint.template get<TextHaloBlur>().options = options;
+ impl_->paint.template get<TextOpacity>().options = options;
baseImpl = std::move(impl_);
}
-TransitionOptions SymbolLayer::getTextHaloBlurTransition() const {
- return impl().paint.template get<TextHaloBlur>().options;
+TransitionOptions SymbolLayer::getTextOpacityTransition() const {
+ return impl().paint.template get<TextOpacity>().options;
}
PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultTextTranslate() {
@@ -1086,63 +1086,63 @@ using namespace conversion;
optional<Error> SymbolLayer::setPaintProperty(const std::string& name, const Convertible& value) {
enum class Property : uint8_t {
- IconOpacity,
IconColor,
+ IconHaloBlur,
IconHaloColor,
IconHaloWidth,
- IconHaloBlur,
+ IconOpacity,
IconTranslate,
IconTranslateAnchor,
- TextOpacity,
TextColor,
+ TextHaloBlur,
TextHaloColor,
TextHaloWidth,
- TextHaloBlur,
+ TextOpacity,
TextTranslate,
TextTranslateAnchor,
- IconOpacityTransition,
IconColorTransition,
+ IconHaloBlurTransition,
IconHaloColorTransition,
IconHaloWidthTransition,
- IconHaloBlurTransition,
+ IconOpacityTransition,
IconTranslateTransition,
IconTranslateAnchorTransition,
- TextOpacityTransition,
TextColorTransition,
+ TextHaloBlurTransition,
TextHaloColorTransition,
TextHaloWidthTransition,
- TextHaloBlurTransition,
+ TextOpacityTransition,
TextTranslateTransition,
TextTranslateAnchorTransition,
};
MAPBOX_ETERNAL_CONSTEXPR const auto properties = mapbox::eternal::hash_map<mapbox::eternal::string, uint8_t>({
- { "icon-opacity", static_cast<uint8_t>(Property::IconOpacity) },
{ "icon-color", static_cast<uint8_t>(Property::IconColor) },
+ { "icon-halo-blur", static_cast<uint8_t>(Property::IconHaloBlur) },
{ "icon-halo-color", static_cast<uint8_t>(Property::IconHaloColor) },
{ "icon-halo-width", static_cast<uint8_t>(Property::IconHaloWidth) },
- { "icon-halo-blur", static_cast<uint8_t>(Property::IconHaloBlur) },
+ { "icon-opacity", static_cast<uint8_t>(Property::IconOpacity) },
{ "icon-translate", static_cast<uint8_t>(Property::IconTranslate) },
{ "icon-translate-anchor", static_cast<uint8_t>(Property::IconTranslateAnchor) },
- { "text-opacity", static_cast<uint8_t>(Property::TextOpacity) },
{ "text-color", static_cast<uint8_t>(Property::TextColor) },
+ { "text-halo-blur", static_cast<uint8_t>(Property::TextHaloBlur) },
{ "text-halo-color", static_cast<uint8_t>(Property::TextHaloColor) },
{ "text-halo-width", static_cast<uint8_t>(Property::TextHaloWidth) },
- { "text-halo-blur", static_cast<uint8_t>(Property::TextHaloBlur) },
+ { "text-opacity", static_cast<uint8_t>(Property::TextOpacity) },
{ "text-translate", static_cast<uint8_t>(Property::TextTranslate) },
{ "text-translate-anchor", static_cast<uint8_t>(Property::TextTranslateAnchor) },
- { "icon-opacity-transition", static_cast<uint8_t>(Property::IconOpacityTransition) },
{ "icon-color-transition", static_cast<uint8_t>(Property::IconColorTransition) },
+ { "icon-halo-blur-transition", static_cast<uint8_t>(Property::IconHaloBlurTransition) },
{ "icon-halo-color-transition", static_cast<uint8_t>(Property::IconHaloColorTransition) },
{ "icon-halo-width-transition", static_cast<uint8_t>(Property::IconHaloWidthTransition) },
- { "icon-halo-blur-transition", static_cast<uint8_t>(Property::IconHaloBlurTransition) },
+ { "icon-opacity-transition", static_cast<uint8_t>(Property::IconOpacityTransition) },
{ "icon-translate-transition", static_cast<uint8_t>(Property::IconTranslateTransition) },
{ "icon-translate-anchor-transition", static_cast<uint8_t>(Property::IconTranslateAnchorTransition) },
- { "text-opacity-transition", static_cast<uint8_t>(Property::TextOpacityTransition) },
{ "text-color-transition", static_cast<uint8_t>(Property::TextColorTransition) },
+ { "text-halo-blur-transition", static_cast<uint8_t>(Property::TextHaloBlurTransition) },
{ "text-halo-color-transition", static_cast<uint8_t>(Property::TextHaloColorTransition) },
{ "text-halo-width-transition", static_cast<uint8_t>(Property::TextHaloWidthTransition) },
- { "text-halo-blur-transition", static_cast<uint8_t>(Property::TextHaloBlurTransition) },
+ { "text-opacity-transition", static_cast<uint8_t>(Property::TextOpacityTransition) },
{ "text-translate-transition", static_cast<uint8_t>(Property::TextTranslateTransition) },
{ "text-translate-anchor-transition", static_cast<uint8_t>(Property::TextTranslateAnchorTransition) }
});
@@ -1155,69 +1155,69 @@ optional<Error> SymbolLayer::setPaintProperty(const std::string& name, const Con
auto property = static_cast<Property>(it->second);
- if (property == Property::IconOpacity || property == Property::IconHaloWidth || property == Property::IconHaloBlur || property == Property::TextOpacity || property == Property::TextHaloWidth || property == Property::TextHaloBlur) {
+ if (property == Property::IconColor || property == Property::IconHaloColor || property == Property::TextColor || property == Property::TextHaloColor) {
Error error;
- optional<PropertyValue<float>> typedValue = convert<PropertyValue<float>>(value, error, true, false);
+ optional<PropertyValue<Color>> typedValue = convert<PropertyValue<Color>>(value, error, true, false);
if (!typedValue) {
return error;
}
- if (property == Property::IconOpacity) {
- setIconOpacity(*typedValue);
- return nullopt;
- }
-
- if (property == Property::IconHaloWidth) {
- setIconHaloWidth(*typedValue);
- return nullopt;
- }
-
- if (property == Property::IconHaloBlur) {
- setIconHaloBlur(*typedValue);
+ if (property == Property::IconColor) {
+ setIconColor(*typedValue);
return nullopt;
}
- if (property == Property::TextOpacity) {
- setTextOpacity(*typedValue);
+ if (property == Property::IconHaloColor) {
+ setIconHaloColor(*typedValue);
return nullopt;
}
- if (property == Property::TextHaloWidth) {
- setTextHaloWidth(*typedValue);
+ if (property == Property::TextColor) {
+ setTextColor(*typedValue);
return nullopt;
}
- if (property == Property::TextHaloBlur) {
- setTextHaloBlur(*typedValue);
+ if (property == Property::TextHaloColor) {
+ setTextHaloColor(*typedValue);
return nullopt;
}
}
- if (property == Property::IconColor || property == Property::IconHaloColor || property == Property::TextColor || property == Property::TextHaloColor) {
+ if (property == Property::IconHaloBlur || property == Property::IconHaloWidth || property == Property::IconOpacity || property == Property::TextHaloBlur || property == Property::TextHaloWidth || property == Property::TextOpacity) {
Error error;
- optional<PropertyValue<Color>> typedValue = convert<PropertyValue<Color>>(value, error, true, false);
+ optional<PropertyValue<float>> typedValue = convert<PropertyValue<float>>(value, error, true, false);
if (!typedValue) {
return error;
}
- if (property == Property::IconColor) {
- setIconColor(*typedValue);
+ if (property == Property::IconHaloBlur) {
+ setIconHaloBlur(*typedValue);
return nullopt;
}
- if (property == Property::IconHaloColor) {
- setIconHaloColor(*typedValue);
+ if (property == Property::IconHaloWidth) {
+ setIconHaloWidth(*typedValue);
return nullopt;
}
- if (property == Property::TextColor) {
- setTextColor(*typedValue);
+ if (property == Property::IconOpacity) {
+ setIconOpacity(*typedValue);
return nullopt;
}
- if (property == Property::TextHaloColor) {
- setTextHaloColor(*typedValue);
+ if (property == Property::TextHaloBlur) {
+ setTextHaloBlur(*typedValue);
+ return nullopt;
+ }
+
+ if (property == Property::TextHaloWidth) {
+ setTextHaloWidth(*typedValue);
+ return nullopt;
+ }
+
+ if (property == Property::TextOpacity) {
+ setTextOpacity(*typedValue);
return nullopt;
}
@@ -1268,13 +1268,13 @@ optional<Error> SymbolLayer::setPaintProperty(const std::string& name, const Con
return error;
}
- if (property == Property::IconOpacityTransition) {
- setIconOpacityTransition(*transition);
+ if (property == Property::IconColorTransition) {
+ setIconColorTransition(*transition);
return nullopt;
}
- if (property == Property::IconColorTransition) {
- setIconColorTransition(*transition);
+ if (property == Property::IconHaloBlurTransition) {
+ setIconHaloBlurTransition(*transition);
return nullopt;
}
@@ -1288,8 +1288,8 @@ optional<Error> SymbolLayer::setPaintProperty(const std::string& name, const Con
return nullopt;
}
- if (property == Property::IconHaloBlurTransition) {
- setIconHaloBlurTransition(*transition);
+ if (property == Property::IconOpacityTransition) {
+ setIconOpacityTransition(*transition);
return nullopt;
}
@@ -1303,13 +1303,13 @@ optional<Error> SymbolLayer::setPaintProperty(const std::string& name, const Con
return nullopt;
}
- if (property == Property::TextOpacityTransition) {
- setTextOpacityTransition(*transition);
+ if (property == Property::TextColorTransition) {
+ setTextColorTransition(*transition);
return nullopt;
}
- if (property == Property::TextColorTransition) {
- setTextColorTransition(*transition);
+ if (property == Property::TextHaloBlurTransition) {
+ setTextHaloBlurTransition(*transition);
return nullopt;
}
@@ -1323,8 +1323,8 @@ optional<Error> SymbolLayer::setPaintProperty(const std::string& name, const Con
return nullopt;
}
- if (property == Property::TextHaloBlurTransition) {
- setTextHaloBlurTransition(*transition);
+ if (property == Property::TextOpacityTransition) {
+ setTextOpacityTransition(*transition);
return nullopt;
}
@@ -1347,88 +1347,88 @@ optional<Error> SymbolLayer::setLayoutProperty(const std::string& name, const Co
return Layer::setVisibility(value);
}
enum class Property {
- SymbolPlacement,
- SymbolSpacing,
- SymbolAvoidEdges,
- SymbolSortKey,
- SymbolZOrder,
IconAllowOverlap,
+ IconAnchor,
IconIgnorePlacement,
+ IconImage,
+ IconKeepUpright,
+ IconOffset,
IconOptional,
+ IconPadding,
+ IconPitchAlignment,
+ IconRotate,
IconRotationAlignment,
IconSize,
IconTextFit,
IconTextFitPadding,
- IconImage,
- IconRotate,
- IconPadding,
- IconKeepUpright,
- IconOffset,
- IconAnchor,
- IconPitchAlignment,
- TextPitchAlignment,
- TextRotationAlignment,
+ SymbolAvoidEdges,
+ SymbolPlacement,
+ SymbolSortKey,
+ SymbolSpacing,
+ SymbolZOrder,
+ TextAllowOverlap,
+ TextAnchor,
TextField,
TextFont,
- TextSize,
- TextMaxWidth,
- TextLineHeight,
- TextLetterSpacing,
+ TextIgnorePlacement,
TextJustify,
- TextRadialOffset,
- TextVariableAnchor,
- TextAnchor,
- TextMaxAngle,
- TextRotate,
- TextPadding,
TextKeepUpright,
- TextTransform,
+ TextLetterSpacing,
+ TextLineHeight,
+ TextMaxAngle,
+ TextMaxWidth,
TextOffset,
- TextAllowOverlap,
- TextIgnorePlacement,
TextOptional,
+ TextPadding,
+ TextPitchAlignment,
+ TextRadialOffset,
+ TextRotate,
+ TextRotationAlignment,
+ TextSize,
+ TextTransform,
+ TextVariableAnchor,
};
MAPBOX_ETERNAL_CONSTEXPR const auto properties = mapbox::eternal::hash_map<mapbox::eternal::string, uint8_t>({
- { "symbol-placement", static_cast<uint8_t>(Property::SymbolPlacement) },
- { "symbol-spacing", static_cast<uint8_t>(Property::SymbolSpacing) },
- { "symbol-avoid-edges", static_cast<uint8_t>(Property::SymbolAvoidEdges) },
- { "symbol-sort-key", static_cast<uint8_t>(Property::SymbolSortKey) },
- { "symbol-z-order", static_cast<uint8_t>(Property::SymbolZOrder) },
{ "icon-allow-overlap", static_cast<uint8_t>(Property::IconAllowOverlap) },
+ { "icon-anchor", static_cast<uint8_t>(Property::IconAnchor) },
{ "icon-ignore-placement", static_cast<uint8_t>(Property::IconIgnorePlacement) },
+ { "icon-image", static_cast<uint8_t>(Property::IconImage) },
+ { "icon-keep-upright", static_cast<uint8_t>(Property::IconKeepUpright) },
+ { "icon-offset", static_cast<uint8_t>(Property::IconOffset) },
{ "icon-optional", static_cast<uint8_t>(Property::IconOptional) },
+ { "icon-padding", static_cast<uint8_t>(Property::IconPadding) },
+ { "icon-pitch-alignment", static_cast<uint8_t>(Property::IconPitchAlignment) },
+ { "icon-rotate", static_cast<uint8_t>(Property::IconRotate) },
{ "icon-rotation-alignment", static_cast<uint8_t>(Property::IconRotationAlignment) },
{ "icon-size", static_cast<uint8_t>(Property::IconSize) },
{ "icon-text-fit", static_cast<uint8_t>(Property::IconTextFit) },
{ "icon-text-fit-padding", static_cast<uint8_t>(Property::IconTextFitPadding) },
- { "icon-image", static_cast<uint8_t>(Property::IconImage) },
- { "icon-rotate", static_cast<uint8_t>(Property::IconRotate) },
- { "icon-padding", static_cast<uint8_t>(Property::IconPadding) },
- { "icon-keep-upright", static_cast<uint8_t>(Property::IconKeepUpright) },
- { "icon-offset", static_cast<uint8_t>(Property::IconOffset) },
- { "icon-anchor", static_cast<uint8_t>(Property::IconAnchor) },
- { "icon-pitch-alignment", static_cast<uint8_t>(Property::IconPitchAlignment) },
- { "text-pitch-alignment", static_cast<uint8_t>(Property::TextPitchAlignment) },
- { "text-rotation-alignment", static_cast<uint8_t>(Property::TextRotationAlignment) },
+ { "symbol-avoid-edges", static_cast<uint8_t>(Property::SymbolAvoidEdges) },
+ { "symbol-placement", static_cast<uint8_t>(Property::SymbolPlacement) },
+ { "symbol-sort-key", static_cast<uint8_t>(Property::SymbolSortKey) },
+ { "symbol-spacing", static_cast<uint8_t>(Property::SymbolSpacing) },
+ { "symbol-z-order", static_cast<uint8_t>(Property::SymbolZOrder) },
+ { "text-allow-overlap", static_cast<uint8_t>(Property::TextAllowOverlap) },
+ { "text-anchor", static_cast<uint8_t>(Property::TextAnchor) },
{ "text-field", static_cast<uint8_t>(Property::TextField) },
{ "text-font", static_cast<uint8_t>(Property::TextFont) },
- { "text-size", static_cast<uint8_t>(Property::TextSize) },
- { "text-max-width", static_cast<uint8_t>(Property::TextMaxWidth) },
- { "text-line-height", static_cast<uint8_t>(Property::TextLineHeight) },
- { "text-letter-spacing", static_cast<uint8_t>(Property::TextLetterSpacing) },
+ { "text-ignore-placement", static_cast<uint8_t>(Property::TextIgnorePlacement) },
{ "text-justify", static_cast<uint8_t>(Property::TextJustify) },
- { "text-radial-offset", static_cast<uint8_t>(Property::TextRadialOffset) },
- { "text-variable-anchor", static_cast<uint8_t>(Property::TextVariableAnchor) },
- { "text-anchor", static_cast<uint8_t>(Property::TextAnchor) },
+ { "text-keep-upright", static_cast<uint8_t>(Property::TextKeepUpright) },
+ { "text-letter-spacing", static_cast<uint8_t>(Property::TextLetterSpacing) },
+ { "text-line-height", static_cast<uint8_t>(Property::TextLineHeight) },
{ "text-max-angle", static_cast<uint8_t>(Property::TextMaxAngle) },
- { "text-rotate", static_cast<uint8_t>(Property::TextRotate) },
+ { "text-max-width", static_cast<uint8_t>(Property::TextMaxWidth) },
+ { "text-offset", static_cast<uint8_t>(Property::TextOffset) },
+ { "text-optional", static_cast<uint8_t>(Property::TextOptional) },
{ "text-padding", static_cast<uint8_t>(Property::TextPadding) },
- { "text-keep-upright", static_cast<uint8_t>(Property::TextKeepUpright) },
+ { "text-pitch-alignment", static_cast<uint8_t>(Property::TextPitchAlignment) },
+ { "text-radial-offset", static_cast<uint8_t>(Property::TextRadialOffset) },
+ { "text-rotate", static_cast<uint8_t>(Property::TextRotate) },
+ { "text-rotation-alignment", static_cast<uint8_t>(Property::TextRotationAlignment) },
+ { "text-size", static_cast<uint8_t>(Property::TextSize) },
{ "text-transform", static_cast<uint8_t>(Property::TextTransform) },
- { "text-offset", static_cast<uint8_t>(Property::TextOffset) },
- { "text-allow-overlap", static_cast<uint8_t>(Property::TextAllowOverlap) },
- { "text-ignore-placement", static_cast<uint8_t>(Property::TextIgnorePlacement) },
- { "text-optional", static_cast<uint8_t>(Property::TextOptional) }
+ { "text-variable-anchor", static_cast<uint8_t>(Property::TextVariableAnchor) }
});
const auto it = properties.find(name.c_str());
@@ -1439,191 +1439,217 @@ optional<Error> SymbolLayer::setLayoutProperty(const std::string& name, const Co
auto property = static_cast<Property>(it->second);
- if (property == Property::SymbolPlacement) {
- Error error;
- optional<PropertyValue<SymbolPlacementType>> typedValue = convert<PropertyValue<SymbolPlacementType>>(value, error, false, false);
- if (!typedValue) {
- return error;
- }
-
- setSymbolPlacement(*typedValue);
- return nullopt;
-
- }
-
- if (property == Property::SymbolSpacing || property == Property::IconPadding || property == Property::TextLineHeight || property == Property::TextMaxAngle || property == Property::TextPadding) {
+ if (property == Property::IconAllowOverlap || property == Property::IconIgnorePlacement || property == Property::IconKeepUpright || property == Property::IconOptional || property == Property::SymbolAvoidEdges || property == Property::TextAllowOverlap || property == Property::TextIgnorePlacement || property == Property::TextKeepUpright || property == Property::TextOptional) {
Error error;
- optional<PropertyValue<float>> typedValue = convert<PropertyValue<float>>(value, error, false, false);
+ optional<PropertyValue<bool>> typedValue = convert<PropertyValue<bool>>(value, error, false, false);
if (!typedValue) {
return error;
}
- if (property == Property::SymbolSpacing) {
- setSymbolSpacing(*typedValue);
- return nullopt;
- }
-
- if (property == Property::IconPadding) {
- setIconPadding(*typedValue);
+ if (property == Property::IconAllowOverlap) {
+ setIconAllowOverlap(*typedValue);
return nullopt;
}
- if (property == Property::TextLineHeight) {
- setTextLineHeight(*typedValue);
+ if (property == Property::IconIgnorePlacement) {
+ setIconIgnorePlacement(*typedValue);
return nullopt;
}
- if (property == Property::TextMaxAngle) {
- setTextMaxAngle(*typedValue);
+ if (property == Property::IconKeepUpright) {
+ setIconKeepUpright(*typedValue);
return nullopt;
}
- if (property == Property::TextPadding) {
- setTextPadding(*typedValue);
+ if (property == Property::IconOptional) {
+ setIconOptional(*typedValue);
return nullopt;
}
- }
-
- if (property == Property::SymbolAvoidEdges || property == Property::IconAllowOverlap || property == Property::IconIgnorePlacement || property == Property::IconOptional || property == Property::IconKeepUpright || property == Property::TextKeepUpright || property == Property::TextAllowOverlap || property == Property::TextIgnorePlacement || property == Property::TextOptional) {
- Error error;
- optional<PropertyValue<bool>> typedValue = convert<PropertyValue<bool>>(value, error, false, false);
- if (!typedValue) {
- return error;
- }
-
if (property == Property::SymbolAvoidEdges) {
setSymbolAvoidEdges(*typedValue);
return nullopt;
}
- if (property == Property::IconAllowOverlap) {
- setIconAllowOverlap(*typedValue);
+ if (property == Property::TextAllowOverlap) {
+ setTextAllowOverlap(*typedValue);
return nullopt;
}
- if (property == Property::IconIgnorePlacement) {
- setIconIgnorePlacement(*typedValue);
+ if (property == Property::TextIgnorePlacement) {
+ setTextIgnorePlacement(*typedValue);
return nullopt;
}
- if (property == Property::IconOptional) {
- setIconOptional(*typedValue);
+ if (property == Property::TextKeepUpright) {
+ setTextKeepUpright(*typedValue);
return nullopt;
}
- if (property == Property::IconKeepUpright) {
- setIconKeepUpright(*typedValue);
+ if (property == Property::TextOptional) {
+ setTextOptional(*typedValue);
return nullopt;
}
- if (property == Property::TextKeepUpright) {
- setTextKeepUpright(*typedValue);
- return nullopt;
+ }
+
+ if (property == Property::IconAnchor || property == Property::TextAnchor) {
+ Error error;
+ optional<PropertyValue<SymbolAnchorType>> typedValue = convert<PropertyValue<SymbolAnchorType>>(value, error, true, false);
+ if (!typedValue) {
+ return error;
}
- if (property == Property::TextAllowOverlap) {
- setTextAllowOverlap(*typedValue);
+ if (property == Property::IconAnchor) {
+ setIconAnchor(*typedValue);
return nullopt;
}
- if (property == Property::TextIgnorePlacement) {
- setTextIgnorePlacement(*typedValue);
+ if (property == Property::TextAnchor) {
+ setTextAnchor(*typedValue);
return nullopt;
}
- if (property == Property::TextOptional) {
- setTextOptional(*typedValue);
- return nullopt;
+ }
+
+ if (property == Property::IconImage) {
+ Error error;
+ optional<PropertyValue<std::string>> typedValue = convert<PropertyValue<std::string>>(value, error, true, true);
+ if (!typedValue) {
+ return error;
}
+ setIconImage(*typedValue);
+ return nullopt;
+
}
- if (property == Property::SymbolSortKey || property == Property::IconSize || property == Property::IconRotate || property == Property::TextSize || property == Property::TextMaxWidth || property == Property::TextLetterSpacing || property == Property::TextRadialOffset || property == Property::TextRotate) {
+ if (property == Property::IconOffset || property == Property::TextOffset) {
Error error;
- optional<PropertyValue<float>> typedValue = convert<PropertyValue<float>>(value, error, true, false);
+ optional<PropertyValue<std::array<float, 2>>> typedValue = convert<PropertyValue<std::array<float, 2>>>(value, error, true, false);
if (!typedValue) {
return error;
}
- if (property == Property::SymbolSortKey) {
- setSymbolSortKey(*typedValue);
+ if (property == Property::IconOffset) {
+ setIconOffset(*typedValue);
return nullopt;
}
- if (property == Property::IconSize) {
- setIconSize(*typedValue);
+ if (property == Property::TextOffset) {
+ setTextOffset(*typedValue);
return nullopt;
}
- if (property == Property::IconRotate) {
- setIconRotate(*typedValue);
- return nullopt;
+ }
+
+ if (property == Property::IconPadding || property == Property::SymbolSpacing || property == Property::TextLineHeight || property == Property::TextMaxAngle || property == Property::TextPadding) {
+ Error error;
+ optional<PropertyValue<float>> typedValue = convert<PropertyValue<float>>(value, error, false, false);
+ if (!typedValue) {
+ return error;
}
- if (property == Property::TextSize) {
- setTextSize(*typedValue);
+ if (property == Property::IconPadding) {
+ setIconPadding(*typedValue);
return nullopt;
}
- if (property == Property::TextMaxWidth) {
- setTextMaxWidth(*typedValue);
+ if (property == Property::SymbolSpacing) {
+ setSymbolSpacing(*typedValue);
return nullopt;
}
- if (property == Property::TextLetterSpacing) {
- setTextLetterSpacing(*typedValue);
+ if (property == Property::TextLineHeight) {
+ setTextLineHeight(*typedValue);
return nullopt;
}
- if (property == Property::TextRadialOffset) {
- setTextRadialOffset(*typedValue);
+ if (property == Property::TextMaxAngle) {
+ setTextMaxAngle(*typedValue);
return nullopt;
}
- if (property == Property::TextRotate) {
- setTextRotate(*typedValue);
+ if (property == Property::TextPadding) {
+ setTextPadding(*typedValue);
return nullopt;
}
}
- if (property == Property::SymbolZOrder) {
+ if (property == Property::IconPitchAlignment || property == Property::IconRotationAlignment || property == Property::TextPitchAlignment || property == Property::TextRotationAlignment) {
Error error;
- optional<PropertyValue<SymbolZOrderType>> typedValue = convert<PropertyValue<SymbolZOrderType>>(value, error, false, false);
+ optional<PropertyValue<AlignmentType>> typedValue = convert<PropertyValue<AlignmentType>>(value, error, false, false);
if (!typedValue) {
return error;
}
- setSymbolZOrder(*typedValue);
- return nullopt;
+ if (property == Property::IconPitchAlignment) {
+ setIconPitchAlignment(*typedValue);
+ return nullopt;
+ }
+
+ if (property == Property::IconRotationAlignment) {
+ setIconRotationAlignment(*typedValue);
+ return nullopt;
+ }
+
+ if (property == Property::TextPitchAlignment) {
+ setTextPitchAlignment(*typedValue);
+ return nullopt;
+ }
+
+ if (property == Property::TextRotationAlignment) {
+ setTextRotationAlignment(*typedValue);
+ return nullopt;
+ }
}
- if (property == Property::IconRotationAlignment || property == Property::IconPitchAlignment || property == Property::TextPitchAlignment || property == Property::TextRotationAlignment) {
+ if (property == Property::IconRotate || property == Property::IconSize || property == Property::SymbolSortKey || property == Property::TextLetterSpacing || property == Property::TextMaxWidth || property == Property::TextRadialOffset || property == Property::TextRotate || property == Property::TextSize) {
Error error;
- optional<PropertyValue<AlignmentType>> typedValue = convert<PropertyValue<AlignmentType>>(value, error, false, false);
+ optional<PropertyValue<float>> typedValue = convert<PropertyValue<float>>(value, error, true, false);
if (!typedValue) {
return error;
}
- if (property == Property::IconRotationAlignment) {
- setIconRotationAlignment(*typedValue);
+ if (property == Property::IconRotate) {
+ setIconRotate(*typedValue);
return nullopt;
}
- if (property == Property::IconPitchAlignment) {
- setIconPitchAlignment(*typedValue);
+ if (property == Property::IconSize) {
+ setIconSize(*typedValue);
return nullopt;
}
- if (property == Property::TextPitchAlignment) {
- setTextPitchAlignment(*typedValue);
+ if (property == Property::SymbolSortKey) {
+ setSymbolSortKey(*typedValue);
return nullopt;
}
- if (property == Property::TextRotationAlignment) {
- setTextRotationAlignment(*typedValue);
+ if (property == Property::TextLetterSpacing) {
+ setTextLetterSpacing(*typedValue);
+ return nullopt;
+ }
+
+ if (property == Property::TextMaxWidth) {
+ setTextMaxWidth(*typedValue);
+ return nullopt;
+ }
+
+ if (property == Property::TextRadialOffset) {
+ setTextRadialOffset(*typedValue);
+ return nullopt;
+ }
+
+ if (property == Property::TextRotate) {
+ setTextRotate(*typedValue);
+ return nullopt;
+ }
+
+ if (property == Property::TextSize) {
+ setTextSize(*typedValue);
return nullopt;
}
@@ -1653,53 +1679,27 @@ optional<Error> SymbolLayer::setLayoutProperty(const std::string& name, const Co
}
- if (property == Property::IconImage) {
+ if (property == Property::SymbolPlacement) {
Error error;
- optional<PropertyValue<std::string>> typedValue = convert<PropertyValue<std::string>>(value, error, true, true);
+ optional<PropertyValue<SymbolPlacementType>> typedValue = convert<PropertyValue<SymbolPlacementType>>(value, error, false, false);
if (!typedValue) {
return error;
}
- setIconImage(*typedValue);
+ setSymbolPlacement(*typedValue);
return nullopt;
}
- if (property == Property::IconOffset || property == Property::TextOffset) {
- Error error;
- optional<PropertyValue<std::array<float, 2>>> typedValue = convert<PropertyValue<std::array<float, 2>>>(value, error, true, false);
- if (!typedValue) {
- return error;
- }
-
- if (property == Property::IconOffset) {
- setIconOffset(*typedValue);
- return nullopt;
- }
-
- if (property == Property::TextOffset) {
- setTextOffset(*typedValue);
- return nullopt;
- }
-
- }
-
- if (property == Property::IconAnchor || property == Property::TextAnchor) {
+ if (property == Property::SymbolZOrder) {
Error error;
- optional<PropertyValue<SymbolAnchorType>> typedValue = convert<PropertyValue<SymbolAnchorType>>(value, error, true, false);
+ optional<PropertyValue<SymbolZOrderType>> typedValue = convert<PropertyValue<SymbolZOrderType>>(value, error, false, false);
if (!typedValue) {
return error;
}
- if (property == Property::IconAnchor) {
- setIconAnchor(*typedValue);
- return nullopt;
- }
-
- if (property == Property::TextAnchor) {
- setTextAnchor(*typedValue);
- return nullopt;
- }
+ setSymbolZOrder(*typedValue);
+ return nullopt;
}
@@ -1739,26 +1739,26 @@ optional<Error> SymbolLayer::setLayoutProperty(const std::string& name, const Co
}
- if (property == Property::TextVariableAnchor) {
+ if (property == Property::TextTransform) {
Error error;
- optional<PropertyValue<std::vector<TextVariableAnchorType>>> typedValue = convert<PropertyValue<std::vector<TextVariableAnchorType>>>(value, error, false, false);
+ optional<PropertyValue<TextTransformType>> typedValue = convert<PropertyValue<TextTransformType>>(value, error, true, false);
if (!typedValue) {
return error;
}
- setTextVariableAnchor(*typedValue);
+ setTextTransform(*typedValue);
return nullopt;
}
- if (property == Property::TextTransform) {
+ if (property == Property::TextVariableAnchor) {
Error error;
- optional<PropertyValue<TextTransformType>> typedValue = convert<PropertyValue<TextTransformType>>(value, error, true, false);
+ optional<PropertyValue<std::vector<TextVariableAnchorType>>> typedValue = convert<PropertyValue<std::vector<TextVariableAnchorType>>>(value, error, false, false);
if (!typedValue) {
return error;
}
- setTextTransform(*typedValue);
+ setTextVariableAnchor(*typedValue);
return nullopt;
}