MapArrow

public class MapArrow
extension MapArrow: NativeBase
extension MapArrow: Hashable

A visual representation of an arrow on the map. It consists of a tail - a polyline with an arbitrary number of points - and a head at its end.

The map arrows are only visible on zoom levels >= 13.

Altitude component of GeoPolyline‘s vertices is ignored.

  • Creates a new MapArrow instance.

    Altitude component of GeoPolyline‘s vertices is ignored.

    Declaration

    Swift

    public init(geometry: GeoPolyline, widthInPixels: Double, color: UIColor)

    Parameters

    geometry

    The geometry of the arrow tail. The last coordinate in the list defines the position where the head of the arrow is located.

    widthInPixels

    The width of the arrow tail in pixel. Negative values are clamped to 0. The tip is scaled accordingly.

    color

    The color of the arrow. The alpha channel is ignored, the color is interpreted as fully opaque.

  • The width of the arrow tail in pixels, where the key is a MapMeasure and the value is a tail width in pixels at this MapMeasure. The width values are linearly interpolated between nearest dictionary entries. Width values for MapMeasure outside the dictionary entries are kept constant, using the value of the largest/smallest key.

    Only MapMeasure of MapMeasure.Kind.zoomLevel type is supported. Other MapMeasure types are unsupported and hence, will be ignored.

    measureDependentTailWidth with a single entry is equivalent to the use of the widthInPixels value in the constructor, so a constant width setting, independent of camera.

    Empty measureDependentTailWidth is ignored and existing width is maintained.

    The width values should be positive. Dictionary entries with width values less than or equal to 0 are ignored.

    Note: This is a beta release of this feature, so there could be a few bugs and unexpected behavior. Related APIs may change for new releases without a deprecation process.

    Declaration

    Swift

    public var measureDependentTailWidth: [MapMeasure : Double] { get set }
  • The list of visibility ranges, in which the map arrow is visible. A range is half-open - [minimumZoomLevel, maximumZoomLevel), the given maximum value is not contained in the range.

    When empty (the default), the map arrows are visible without map measure restrictions. Only MapMeasureRange(s) of MapMeasure.Kind.zoomLevel type are supported. MapMeasureRange(s) of other unsupported types will be ignored.}

    Declaration

    Swift

    public var visibilityRanges: [MapMeasureRange] { get set }