MapArrow (API Reference)
Class MapArrow
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.
-
Constructor Summary
ConstructorsConstructorDescriptionMapArrow(GeoPolyline geometry, double widthInPixels, Color color) Creates a newMapArrowinstance. -
Method Summary
Modifier and TypeMethodDescriptionGets theMapMeasuredependent arrow tail width in pixels.Gets the list of visibility ranges.voidSets theMapMeasuredependent arrow tail width in pixels.voidsetVisibilityRanges(List<MapMeasureRange> value) Sets visibility ranges for this map arrow.
-
Constructor Details
-
MapArrow
Creates a new
MapArrowinstance.Altitude component of
GeoPolyline's vertices is ignored.- 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.
-
-
Method Details
-
getMeasureDependentTailWidth
Gets the
MapMeasuredependent arrow tail width in pixels.If tail width was configured without
MapMeasuredependency, thenmeasureDependentTailWidthcontains single entry with measure 0 of typeMapMeasure.Kind.ZOOM_LEVELand width value equal towidthInPixels.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.
- Returns:
The width of the arrow tail in pixels, where the key is a
MapMeasureand the value is a tail width in pixels at thisMapMeasure.
-
setMeasureDependentTailWidth
Sets the
MapMeasuredependent arrow tail width in pixels.The width values are linearly interpolated between nearest map entries. Width values for
MapMeasureoutside the map entries are kept constant, using the value of the largest/smallest key.Only
MapMeasureofMapMeasure.Kind.ZOOM_LEVELtype is supported. OtherMapMeasuretypes are unsupported and hence, will be ignored.Map with a single entry is equivalent to use of the
widthInPixelsvalue in the constructor, so a constant width setting, independent of camera.Empty input is ignored and existing width is maintained.
The width values should be positive. Map 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.
- Parameters:
value-The width of the arrow tail in pixels, where the key is a
MapMeasureand the value is a tail width in pixels at thisMapMeasure.
-
getVisibilityRanges
Gets the list of visibility ranges.
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.ZOOM_LEVELtype are supported.MapMeasureRange(s) of other unsupported types will be ignored.}- Returns:
The list of visibility ranges, in which the map arrow is visible.
-
setVisibilityRanges
Sets visibility ranges for this map arrow.
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.ZOOM_LEVELtype are supported.MapMeasureRange(s) of other unsupported types will be ignored.}- Parameters:
value-The list of visibility ranges, in which the map arrow is visible.
-