Class RealisticViewWarning

java.lang.Object
com.here.sdk.navigation.RealisticViewWarning

public final class RealisticViewWarning extends Object

A realistic view notification. This notification is given for complex junctions and it includes a visual representation of that junction, in order to help the user to better navigate it. When distanceType is DistanceType.AHEAD, the realisticViewVectorImage object will be provided with the junction view and the signpost representations. For distanceType with value DistanceType.PASSED, the realisticViewVectorImage object will be null. Use RealisticViewWarningListener to get notifications about the realistic views of the upcoming junctions.

Realistic view notifications require an online connection in order to function properly, or that the junction or signpost map layer data is cached, installed or preloaded as part of a Region. This can be enabled via feature configurations.

  • Field Details

    • id

      public int id

      Unique identifier for this specific realistic view warning instance. Each warning type (truck restrictions, speed warnings, etc.) maintains its own independent ID namespace. Use this ID to track, update, or dismiss individual warning instances of this type.

    • distanceToRealisticViewInMeters

      @Deprecated public double distanceToRealisticViewInMeters
      Deprecated.

      Will be removed in v4.29.0. Use the WarningUpdate implementation instead.

      Distance to the junction, for which the realistic view is given, expressed in meters.

    • realisticViewVectorImage

      @Nullable public RealisticViewVectorImage realisticViewVectorImage

      The realistic view object for which the warning is given. Image resources are stored as vector graphics. Within RealisticViewWarning, only one type of image, either raster or vector, will be provided. If this property is not null, then realisticViewRasterImage will be null.

      Note: The realistic views for most of the countries are stored as vector images.

    • realisticViewRasterImage

      @Nullable public RealisticViewRasterImage realisticViewRasterImage

      The realistic view object for which the warning is given. Image resources are stored as raster graphics. Within RealisticViewWarning, only one type of image, either raster or vector, will be provided. If this property is not null, then realisticViewVectorImage will be null. Note: Certain countries support only raster images as realistic views. Currently, this is the case only for Japan, but in the future, more countries might support this type of realistic views.

    • distanceType

      @Deprecated @NonNull public DistanceType distanceType
      Deprecated.

      Will be removed in v4.29.0. Use the WarningStatus implementation instead.

      The distance type for the warning, e.g. a warning for a new realistic view ahead or a warning for passing a realistic view. Since the realistic view warning is given relative to a single position on the route, DistanceType.REACHED will never be given for this warning.

  • Constructor Details

    • RealisticViewWarning

      @Deprecated public RealisticViewWarning(int id, @Deprecated double distanceToRealisticViewInMeters, @Nullable RealisticViewVectorImage realisticViewVectorImage, @Nullable RealisticViewRasterImage realisticViewRasterImage, @Deprecated @NonNull DistanceType distanceType)
      Deprecated.

      Will be removed in v4.29.0. Use the constructor without deprecated fields instead.

      Creates a new instance.

      Parameters:
      id -

      Unique identifier for this specific realistic view warning instance. Each warning type (truck restrictions, speed warnings, etc.) maintains its own independent ID namespace. Use this ID to track, update, or dismiss individual warning instances of this type.

      distanceToRealisticViewInMeters -

      Distance to the junction, for which the realistic view is given, expressed in meters.

      realisticViewVectorImage -

      The realistic view object for which the warning is given. Image resources are stored as vector graphics. Within RealisticViewWarning, only one type of image, either raster or vector, will be provided. If this property is not null, then realisticViewRasterImage will be null.

      Note: The realistic views for most of the countries are stored as vector images.

      realisticViewRasterImage -

      The realistic view object for which the warning is given. Image resources are stored as raster graphics. Within RealisticViewWarning, only one type of image, either raster or vector, will be provided. If this property is not null, then realisticViewVectorImage will be null. Note: Certain countries support only raster images as realistic views. Currently, this is the case only for Japan, but in the future, more countries might support this type of realistic views.

      distanceType -

      The distance type for the warning, e.g. a warning for a new realistic view ahead or a warning for passing a realistic view. Since the realistic view warning is given relative to a single position on the route, DistanceType.REACHED will never be given for this warning.

  • Method Details