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 lineWidth line width is constant and equal to the width given for the smallest map measure in the lineWidth.

    At map measures bigger than biggest map measure in the lineWidth line width is constant and equal to the width given for the biggest map measure in the lineWidth.

    At map measures between two nearest given map measures line width is linearly interpolated between width values given for these map measures.

    For MapMeasure.Kind only MapMeasure.Kind.zoomLevel is supported.

    For RenderSize.Unit only RenderSize.Unit.pixels is supported.

    lineWidth must not be 0 (lineWidth.sizes with all values set to 0.0).

    Throws

    MapPolyline.Representation.InstantiationError In case of invalid input parameters.

    Declaration

    Swift

    public init(lineWidth: MapMeasureDependentRenderSize, color: UIColor, capShape: LineCap) throws

    Parameters

    lineWidth

    The width of the polyline depending on the map measure.

    color

    The color of the polyline.

    capShape

    The 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 lineWidth and outlineWidth, the value is constant and equal to the width given for the smallest map measure in the lineWidth and outlineWidth.

    At map measures bigger than biggest map measure in the lineWidth and outlineWidth, the value is constant and equal to the width given for the biggest map measure in the lineWidth and outlineWidth.

    At map measures between two nearest given map measure is linearly interpolated between width values given for these map measures.

    For MapMeasure.Kind only MapMeasure.Kind.zoomLevel is supported.

    For RenderSize.Unit only RenderSize.Unit.pixels is supported.

    lineWidth must not be 0 (lineWidth.sizes with all values set to 0.0).

    Throws

    MapPolyline.Representation.InstantiationError In case of invalid input parameters.

    Declaration

    Swift

    public init(lineWidth: MapMeasureDependentRenderSize, color: UIColor, outlineWidth: MapMeasureDependentRenderSize, outlineColor: UIColor, capShape: LineCap) throws

    Parameters

    lineWidth

    The width of the polyline depending on the map measure.

    color

    The color of the polyline.

    outlineWidth

    The width of the outline on one side of the polyline depending on the map measure.

    outlineColor

    The outline color of the polyline.

    capShape

    The 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 lineWidth line width is constant and equal to the width given for the smallest map measure in the lineWidth.

    At map measures bigger than biggest map measure in the lineWidth line width is constant and equal to the width given for the biggest map measure in the lineWidth.

    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 the outlineWidth.

    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 the outlineWidth.

    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 }