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
MapArrowinstance.Altitude component of
GeoPolyline‘s vertices is ignored.Declaration
Swift
public init(geometry: GeoPolyline, widthInPixels: Double, color: UIColor)Parameters
geometryThe geometry of the arrow tail. The last coordinate in the list defines the position where the head of the arrow is located.
widthInPixelsThe width of the arrow tail in pixel. Negative values are clamped to 0. The tip is scaled accordingly.
colorThe 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
MapMeasureand the value is a tail width in pixels at thisMapMeasure. The width values are linearly interpolated between nearest dictionary entries. Width values forMapMeasureoutside the dictionary entries are kept constant, using the value of the largest/smallest key.Only
MapMeasureofMapMeasure.Kind.zoomLeveltype is supported. OtherMapMeasuretypes are unsupported and hence, will be ignored.measureDependentTailWidthwith a single entry is equivalent to the use of thewidthInPixelsvalue in the constructor, so a constant width setting, independent of camera.Empty
measureDependentTailWidthis 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) ofMapMeasure.Kind.zoomLeveltype are supported.MapMeasureRange(s) of other unsupported types will be ignored.}Declaration
Swift
public var visibilityRanges: [MapMeasureRange] { get set }