File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
MapLibreSwiftDSL/Style Layers Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import MapLibreSwiftMacros
7
7
@MLNStyleProperty < UIColor > ( " lineColor " , supportsInterpolation: true )
8
8
@MLNRawRepresentableStyleProperty < LineCap > ( " lineCap " )
9
9
@MLNRawRepresentableStyleProperty < LineJoin > ( " lineJoin " )
10
+ @MLNStyleProperty < [ Float ] > ( " lineDashPattern " )
10
11
@MLNStyleProperty < Float > ( " lineWidth " , supportsInterpolation: true )
11
12
public struct LineStyleLayer : SourceBoundVectorStyleLayerDefinition {
12
13
public let identifier : String
@@ -75,7 +76,7 @@ private struct LineStyleLayerInternal: StyleLayer {
75
76
result. lineCap = definition. lineCap
76
77
result. lineWidth = definition. lineWidth
77
78
result. lineJoin = definition. lineJoin
78
-
79
+ result . lineDashPattern = definition . lineDashPattern
79
80
result. predicate = definition. predicate
80
81
81
82
return result
Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ struct PolylineMapView: View {
30
30
31
31
// Add an inner (blue) polyline
32
32
LineStyleLayer ( identifier: " polyline-inner " , source: polylineSource)
33
- . lineCap ( . round)
33
+ . lineDashPattern ( [ 2.0 , 0.5 ] )
34
+ . lineCap ( . butt)
34
35
. lineJoin ( . round)
35
36
. lineColor ( . systemBlue)
36
37
. lineWidth ( interpolatedBy: . zoomLevel,
You can’t perform that action at this time.
0 commit comments