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 Details

    • MapArrow

      public MapArrow(@NonNull GeoPolyline geometry, double widthInPixels, @NonNull Color color)

      Creates a new MapArrow instance.

      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

      @NonNull public Map<MapMeasure,Double> getMeasureDependentTailWidth()

      Gets the MapMeasure dependent arrow tail width in pixels.

      If tail width was configured without MapMeasure dependency, then measureDependentTailWidth contains single entry with measure 0 of type MapMeasure.Kind.ZOOM_LEVEL and width value equal to widthInPixels.

      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 MapMeasure and the value is a tail width in pixels at this MapMeasure.

    • setMeasureDependentTailWidth

      public void setMeasureDependentTailWidth(@NonNull Map<MapMeasure,Double> value)

      Sets the MapMeasure dependent arrow tail width in pixels.

      The width values are linearly interpolated between nearest map entries. Width values for MapMeasure outside the map entries are kept constant, using the value of the largest/smallest key.

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

      Map with a single entry is equivalent to use of the widthInPixels value 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 MapMeasure and the value is a tail width in pixels at this MapMeasure.

    • getVisibilityRanges

      @NonNull public 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) of MapMeasure.Kind.ZOOM_LEVEL type 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 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) of MapMeasure.Kind.ZOOM_LEVEL type 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.