Class MapArrow
Class MapArrow
- java.lang.Object
-
- com.here.NativeBase
-
- com.here.sdk.mapview.MapArrow
-
public final class MapArrow extends NativeBase
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
Constructors Constructor Description MapArrow(GeoPolyline geometry, double widthInPixels, Color color)Creates a newMapArrowinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<MapMeasure,java.lang.Double>getMeasureDependentTailWidth()Gets theMapMeasuredependent arrow tail width in pixels.java.util.List<MapMeasureRange>getVisibilityRanges()Gets the list of visibility ranges.voidsetMeasureDependentTailWidth(java.util.Map<MapMeasure,java.lang.Double> value)Sets theMapMeasuredependent arrow tail width in pixels.voidsetVisibilityRanges(java.util.List<MapMeasureRange> value)Sets visibility ranges for this map arrow.
-
-
-
Constructor Detail
-
MapArrow
public MapArrow(@NonNull GeoPolyline geometry, double widthInPixels, @NonNull Color color)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 Detail
-
getMeasureDependentTailWidth
@NonNull public java.util.Map<MapMeasure,java.lang.Double> 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
public void setMeasureDependentTailWidth(@NonNull java.util.Map<MapMeasure,java.lang.Double> value)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
@NonNull public java.util.List<MapMeasureRange> 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
public void setVisibilityRanges(@NonNull java.util.List<MapMeasureRange> value)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.
-
-