SolidRepresentation
public class SolidRepresentation : MapPolyline.Representation
Representation for a solid line without outline.
Can represent polylines that have constant width or width dependent on the map zoom.
To achieve constant width lines, use MapMeasureDependentRenderSize with a single value.
To achieve line width dependent on map zoom, use MapMeasureDependentRenderSize with
multiple values.
For MapMeasure.Kind only MapMeasure.Kind.zoomLevel is supported.
For RenderSize.Unit only RenderSize.Unit.pixels is supported.
-
Creates a representation for a solid line without outline.
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 line width is linearly interpolated between width values given for these map measures.
For
MapMeasure.KindonlyMapMeasure.Kind.zoomLevelis supported.For
RenderSize.UnitonlyRenderSize.Unit.pixelsis supported.lineWidthmust not be 0 (lineWidth.sizeswith all values set to 0.0).Throws
MapPolyline.Representation.InstantiationErrorIn case of invalid input parameters.Declaration
Swift
public init(lineWidth: MapMeasureDependentRenderSize, color: UIColor, capShape: LineCap) throwsParameters
lineWidthThe width of the polyline depending on the map measure.
colorThe color of the polyline.
capShapeThe cap shape applied to both ends of the polyline.
-
Creates a representation for a solid line with outline.
The total width of the polyline is
line width + 2 * outline width.At map measures smaller than smallest map measure in the
lineWidthandoutlineWidth, the value is constant and equal to the width given for the smallest map measure in thelineWidthandoutlineWidth.At map measures bigger than biggest map measure in the
lineWidthandoutlineWidth, the value is constant and equal to the width given for the biggest map measure in thelineWidthandoutlineWidth.At map measures between two nearest given map measure is linearly interpolated between width values given for these map measures.
For
MapMeasure.KindonlyMapMeasure.Kind.zoomLevelis supported.For
RenderSize.UnitonlyRenderSize.Unit.pixelsis supported.lineWidthmust not be 0 (lineWidth.sizeswith all values set to 0.0).Throws
MapPolyline.Representation.InstantiationErrorIn case of invalid input parameters.Declaration
Swift
public init(lineWidth: MapMeasureDependentRenderSize, color: UIColor, outlineWidth: MapMeasureDependentRenderSize, outlineColor: UIColor, capShape: LineCap) throwsParameters
lineWidthThe width of the polyline depending on the map measure.
colorThe color of the polyline.
outlineWidthThe width of the outline on one side of the polyline depending on the map measure.
outlineColorThe outline color of the polyline.
capShapeThe cap shape applied to both ends of the polyline.
-
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 color of the polyline.
Declaration
Swift
public var lineColor: UIColor { get } -
The width of the outline on one side of the polyline depending on the map measure. The total width of the polyline is
line width + 2 * outline width.At map measures smaller than smallest map measure in the
outlineWidth, outline width is constant and equal to the width given for the smallest map measure in theoutlineWidth.At map measures bigger than biggest map measure in the
outlineWidth, outline width is constant and equal to the width given for the biggest map measure in theoutlineWidth.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 outlineWidth: MapMeasureDependentRenderSize { get } -
The outline color of the polyline.
Declaration
Swift
public var outlineColor: UIColor { get } -
The cap shape applied to both ends of the polyline and its outline.
Declaration
Swift
public var capShape: LineCap { get }