LineOptions
public struct LineOptions : Equatable
A struct containing information about the options of the line.
-
Line thickness. This property is measured in points. Default is 8 points
Declaration
Swift
public let width: Float
-
The opacity at which the line will be drawn. Default is 0.8
Declaration
Swift
public let opacity: Float
-
The color with which the line will be drawn. Default is .blue
Declaration
Swift
public let color: UIColor
-
Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to points, multiply the length by the current line width. Note that GeoJSON sources with
lineMetrics: true
specified won’t render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.This property is measured in line widths.
This attribute corresponds to the
line-dasharray
layout property in the Mapbox Style Specification.You can set this property to an expression containing any of the following:
- Constant array values no less than 0
- Predefined functions, including mathematical and string operators
- Conditional expressions
- Variable assignments and references to assigned variables
- Step functions applied to the
$zoomLevel
variable
This property does not support applying interpolation functions to the
$zoomLevel
variable or applying interpolation or step functions to feature attributes.Default is nil
Declaration
Swift
public let dashPattern: NSExpression?
-
Initializes and returns a newly allocated itinerary projection options with the specified parameters.
Declaration
Swift
public init(width: Float = 8, opacity: Float = 0.8, color: UIColor = .blue, dashPattern: NSExpression? = nil)
Parameters
width
Itinerary projection line thickness. This property is measured in points. Default is 8 points
opacity
The opacity at which itinerary projection line will be drawn. Default is 0.8
color
The color with which itinerary projection line will be drawn. Default is .gray
dashPattern
Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. Default is nil