DashRepresentation
public class DashRepresentation : MapPolyline.Representation
Represents a dash pattern for map polyline where the dash can be rendered as a colored line and the gap can be either empty or colored.
The length of the dash and gap are set independently, allowing for patterns
like ' — — — —' (dash length = gap length) or ' ——— ——— ———' (dash length != gap length).
-
Creates a representation for a dashed line. Gaps are not displayed.
At map measures smaller than the smallest map measure in the
lineWidth,dashLengthandgapLength, the value used for rendering is constant and equal to the value given for the smallest map measure in the respectiveMapMeasureDependentRenderSizeobject.At map measures bigger than the biggest map measure in the
lineWidth,dashLengthandgapLength, the value used for rendering is constant and equal to the value given for the biggest map measure in the respectiveMapMeasureDependentRenderSizeobject.At map measures between two nearest given map measures, the values are linearly interpolated between values given for these map measures.
For
MapMeasure.KindonlyMapMeasure.Kind.zoomLevelis supported.For
RenderSize.UnitonlyRenderSize.Unit.pixelsis supported.All sizes must not be 0 (
MapMeasureDependentRenderSize.sizeswith all values set to 0.0).Throws
MapPolyline.Representation.InstantiationErrorIn case of invalid input parameters.Declaration
Swift
public init(lineWidth: MapMeasureDependentRenderSize, dashLength: MapMeasureDependentRenderSize, gapLength: MapMeasureDependentRenderSize, dashColor: UIColor) throwsParameters
lineWidthThe width of the polyline depending on the map measure.
dashLengthThe dash length of the polyline depending on the map measure.
gapLengthThe gap length of the polyline depending on the map measure.
dashColorThe dash color of the polyline.
-
Creates a representation for a dashed line with both dash and the gap being colored.
At map measures smaller than the smallest map measure in the
lineWidth,dashLengthandgapLength, the value used for rendering is constant and equal to the value given for the smallest map measure in the respectiveMapMeasureDependentRenderSizeobject.At map measures bigger than the biggest map measure in the
lineWidth,dashLengthandgapLength, the value used for rendering is constant and equal to the value given for the biggest map measure in the respectiveMapMeasureDependentRenderSizeobject.At map measures between two nearest given map measures, the values are linearly interpolated between values given for these map measures.
For
MapMeasure.KindonlyMapMeasure.Kind.zoomLevelis supported.For
RenderSize.UnitonlyRenderSize.Unit.pixelsis supported.All sizes must not be 0 (
MapMeasureDependentRenderSize.sizeswith all values set to 0.0).Throws
MapPolyline.Representation.InstantiationErrorIn case of invalid input parameters.Declaration
Swift
public init(lineWidth: MapMeasureDependentRenderSize, dashLength: MapMeasureDependentRenderSize, gapLength: MapMeasureDependentRenderSize, dashColor: UIColor, gapColor: UIColor) throwsParameters
lineWidthThe width of the polyline depending on the map measure.
dashLengthThe dash length of the polyline depending on the map measure.
gapLengthThe gap length of the polyline depending on the map measure.
dashColorThe color of the dashes.
gapColorThe color of the gaps.
-
The width of the polyline depending on the map measure. At map measures smaller than smallest map measure in the
lineWidthline width is constant and equal to the width given for the smallest map measure in thelineWidth.At map measures bigger than biggest map measure in the
lineWidthline width is constant and equal to the width given for the biggest map measure in thelineWidth.At map measures between two nearest given map measures, the values are linearly interpolated between values given for these map measures.
Declaration
Swift
public var lineWidth: MapMeasureDependentRenderSize { get } -
The dash length of the polyline depending on the map measure. At map measures smaller than smallest map measure in the
dashLengthline width is constant and equal to the width given for the smallest map measure in thedashLength.At map measures bigger than biggest map measure in the
dashLengthline width is constant and equal to the width given for the biggest map measure in thedashLength.At map measures between two nearest given map measures, the values are linearly interpolated between values given for these map measures.
Declaration
Swift
public var dashLength: MapMeasureDependentRenderSize { get } -
The gap length of the polyline depending on the map measure. At map measures smaller than smallest map measure in the
gapLengthline width is constant and equal to the width given for the smallest map measure in thegapLength.At map measures bigger than biggest map measure in the
gapLengthline width is constant and equal to the width given for the biggest map measure in thegapLength.At map measures between two nearest given map measures, the values are linearly interpolated between values given for these map measures.
Declaration
Swift
public var gapLength: MapMeasureDependentRenderSize { get } -
The color of the dashes of the polyline.
Declaration
Swift
public var dashColor: UIColor { get } -
The color for the gaps of the polyline. The default value is
niland no color is used.Declaration
Swift
public var gapColor: UIColor? { get }