Skip to content

Commit 4dc3820

Browse files
authored
adding iconAnchor, textAllowsOverlap (#97)
1 parent b77b658 commit 4dc3820

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/MapLibreSwiftDSL/Style Layers/Symbol.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import MapLibreSwiftMacros
77
@MLNStyleProperty<UIColor>("iconColor", supportsInterpolation: true)
88
@MLNStyleProperty<Bool>("iconAllowsOverlap", supportsInterpolation: false)
99
@MLNStyleProperty<CGVector>("iconOffset", supportsInterpolation: true)
10+
// An enum would probably be better?
11+
@MLNStyleProperty<String>("iconAnchor", supportsInterpolation: false)
1012

1113
@MLNStyleProperty<UIColor>("textColor", supportsInterpolation: true)
1214
@MLNStyleProperty<Double>("textFontSize", supportsInterpolation: true)
@@ -16,6 +18,7 @@ import MapLibreSwiftMacros
1618
@MLNStyleProperty<String>("textAnchor", supportsInterpolation: false)
1719
@MLNStyleProperty<CGVector>("textOffset", supportsInterpolation: true)
1820
@MLNStyleProperty<Double>("maximumTextWidth", supportsInterpolation: true)
21+
@MLNStyleProperty<Bool>("textAllowsOverlap", supportsInterpolation: false)
1922

2023
@MLNStyleProperty<UIColor>("textHaloColor", supportsInterpolation: true)
2124
@MLNStyleProperty<Double>("textHaloWidth", supportsInterpolation: true)
@@ -144,6 +147,7 @@ private struct SymbolStyleLayerInternal: StyleLayer {
144147
result.iconAllowsOverlap = definition.iconAllowsOverlap
145148
result.iconColor = definition.iconColor
146149
result.iconOffset = definition.iconOffset
150+
result.iconAnchor = definition.iconAnchor
147151

148152
result.text = definition.text
149153
result.textColor = definition.textColor
@@ -152,6 +156,7 @@ private struct SymbolStyleLayerInternal: StyleLayer {
152156
result.textAnchor = definition.textAnchor
153157
result.textOffset = definition.textOffset
154158
result.textFontNames = definition.textFontNames
159+
result.textAllowsOverlap = definition.textAllowsOverlap
155160

156161
result.textHaloColor = definition.textHaloColor
157162
result.textHaloWidth = definition.textHaloWidth

0 commit comments

Comments
 (0)