Implement icon-anchor property

This commit is contained in:
Lauren Budorick
2017-08-28 13:32:56 -07:00
committed by GitHub
parent c6ab20e5c6
commit 2de89a99bc
27 changed files with 558 additions and 122 deletions

View File

@@ -45,6 +45,7 @@ auto makeLayoutPropertySetters() {
result["icon-padding"] = &setProperty<V, SymbolLayer, PropertyValue<float>, &SymbolLayer::setIconPadding>;
result["icon-keep-upright"] = &setProperty<V, SymbolLayer, PropertyValue<bool>, &SymbolLayer::setIconKeepUpright>;
result["icon-offset"] = &setProperty<V, SymbolLayer, DataDrivenPropertyValue<std::array<float, 2>>, &SymbolLayer::setIconOffset>;
result["icon-anchor"] = &setProperty<V, SymbolLayer, DataDrivenPropertyValue<SymbolAnchorType>, &SymbolLayer::setIconAnchor>;
result["icon-pitch-alignment"] = &setProperty<V, SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setIconPitchAlignment>;
result["text-pitch-alignment"] = &setProperty<V, SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setTextPitchAlignment>;
result["text-rotation-alignment"] = &setProperty<V, SymbolLayer, PropertyValue<AlignmentType>, &SymbolLayer::setTextRotationAlignment>;
@@ -55,7 +56,7 @@ auto makeLayoutPropertySetters() {
result["text-line-height"] = &setProperty<V, SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextLineHeight>;
result["text-letter-spacing"] = &setProperty<V, SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextLetterSpacing>;
result["text-justify"] = &setProperty<V, SymbolLayer, DataDrivenPropertyValue<TextJustifyType>, &SymbolLayer::setTextJustify>;
result["text-anchor"] = &setProperty<V, SymbolLayer, DataDrivenPropertyValue<TextAnchorType>, &SymbolLayer::setTextAnchor>;
result["text-anchor"] = &setProperty<V, SymbolLayer, DataDrivenPropertyValue<SymbolAnchorType>, &SymbolLayer::setTextAnchor>;
result["text-max-angle"] = &setProperty<V, SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextMaxAngle>;
result["text-rotate"] = &setProperty<V, SymbolLayer, DataDrivenPropertyValue<float>, &SymbolLayer::setTextRotate>;
result["text-padding"] = &setProperty<V, SymbolLayer, PropertyValue<float>, &SymbolLayer::setTextPadding>;

View File

@@ -98,6 +98,10 @@ public:
DataDrivenPropertyValue<std::array<float, 2>> getIconOffset() const;
void setIconOffset(DataDrivenPropertyValue<std::array<float, 2>>);
static DataDrivenPropertyValue<SymbolAnchorType> getDefaultIconAnchor();
DataDrivenPropertyValue<SymbolAnchorType> getIconAnchor() const;
void setIconAnchor(DataDrivenPropertyValue<SymbolAnchorType>);
static PropertyValue<AlignmentType> getDefaultIconPitchAlignment();
PropertyValue<AlignmentType> getIconPitchAlignment() const;
void setIconPitchAlignment(PropertyValue<AlignmentType>);
@@ -138,9 +142,9 @@ public:
DataDrivenPropertyValue<TextJustifyType> getTextJustify() const;
void setTextJustify(DataDrivenPropertyValue<TextJustifyType>);
static DataDrivenPropertyValue<TextAnchorType> getDefaultTextAnchor();
DataDrivenPropertyValue<TextAnchorType> getTextAnchor() const;
void setTextAnchor(DataDrivenPropertyValue<TextAnchorType>);
static DataDrivenPropertyValue<SymbolAnchorType> getDefaultTextAnchor();
DataDrivenPropertyValue<SymbolAnchorType> getTextAnchor() const;
void setTextAnchor(DataDrivenPropertyValue<SymbolAnchorType>);
static PropertyValue<float> getDefaultTextMaxAngle();
PropertyValue<float> getTextMaxAngle() const;

View File

@@ -68,7 +68,7 @@ enum class TextJustifyType : uint8_t {
Right
};
enum class TextAnchorType : uint8_t {
enum class SymbolAnchorType : uint8_t {
Center,
Left,
Right,