VisualNavigator class abstract

This class provides all functionality of NavigatorInterface.

In addition, it provides advanced rendering capabilities for a smooth navigation experience. This includes interpolation of location updates along a route during turn-by-turn navigation and during tracking mode. By default, suitable map view settings are automatically applied. For example, a predefined current location marker is rendered. Similar to Navigator, this class continuously reacts to new locations provided from a location source and acts as a LocationListener. Note that the VisualNavigator takes control of the MapView's (maximum) frame rate when rendering, i.e., between VisualNavigator.startRendering and VisualNavigator.stopRendering calls. It overwrites the MapView's frame rate when some camera behavior is set using the VisualNavigator.guidanceFrameRate. When no camera behavior is preset, the original MapView's frame rate (the value prior to the VisualNavigator.startRendering call) will be used. While the VisualNavigator is rendering, direct changes in the MapView's frame rate can lead to unexpected behavior and therefore should be avoided.

Implemented types

Constructors

VisualNavigator()
Creates a new instance of this class.
factory
VisualNavigator.withNavigator(NavigatorInterface navigator)
Creates a new instance of this class using provided instance of NavigatorInterface as source of data.
factory
VisualNavigator.withSdkEngine(SDKNativeEngine sdkEngine)
Creates a new instance of this class.
factory
VisualNavigator.withSdkEngineAndNavigator(SDKNativeEngine sdkEngine, NavigatorInterface navigator)
Creates a new instance of this class using provided instance of NavigatorInterface as source of data.
factory

Properties

borderCrossingWarningListener BorderCrossingWarningListener?
Object to receive notifications about border crossings on the current road. Border crossing notifications are given only if a route is present. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive notifications about border crossings on the current road.
getter/setter pairinherited
borderCrossingWarningOptions BorderCrossingWarningOptions
Border crossing warning options to be passed to BorderCrossingWarningListener. These options allow the filtering of the border crossing warnings received and set the notification distances. Gets border crossing warning options to be passed to BorderCrossingWarningListener.
getter/setter pairinherited
cameraBehavior CameraBehavior?
Camera behavior which defines how the VisualNavigator handles the camera. Setting null disables any camera behavior with the result that the camera does not follow the current location and keeps the last active camera state, i.e., current zoom and tilt. Furthermore, when null is set map gestures can be used again to freely pan and zoom the map. In opposition, when a camera behavior is defined, then the map cannot be panned and zoomed by the user. The default value is an instance of FixedCameraBehavior. Gets the currently set camera behavior.
getter/setter pair
colors VisualNavigatorColors
Object containing colors used to render route progress and maneuver arrow visualization. Setting a new instance overwrites the default color settings as specified in VisualNavigatorColors. Gets an object containing colors used to render route progress and maneuver arrow visualization.
getter/setter pair
currentSituationLaneAssistanceViewListener CurrentSituationLaneAssistanceViewListener?
Object to receive current situation lane assistance view notifications. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive current situation lane assistance view notifications.
getter/setter pairinherited
customLocationIndicator LocationIndicator?
Custom location indicator LocationIndicator which VisualNavigator uses instead of the default. If set, the user is responsible for adding and removing the object to/from the mapview. It is important to stop sending location updates to the provided LocationIndicator, since VisualNavigator will control its position when rendering is active, i.e., between startRendering() and stopRendering() calls. By default this property is null, which means the default indicator is used, and VisualNavigator automatically adds and removes it to/from the mapview upon startRendering() and stopRendering() calls. Gets the currently set LocationIndicator.
getter/setter pair
dangerZoneWarningListener DangerZoneWarningListener?
Object to receive notification on approaching danger zones. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive current danger zones notifications.
getter/setter pairinherited
debugGpxFilePath ↔ String?
Show the contents of a GPX file on the map. Note: This API should be used for debugging purposes only. Gets the path of the GPX file, is any available, currently being displayed on the map.
getter/setter pair
destinationReachedListener DestinationReachedListener?
Object to receive the notification about the arrival at the destination. Destination reached notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener that notify when the destination has been reached.
getter/setter pairinherited
environmentalZoneWarningListener EnvironmentalZoneWarningListener?
Object to receive notification on approaching environmental zones. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive current environmental zones notifications.
getter/setter pairinherited
eventTextListener EventTextListener?
Object to receive text notifications when they are available. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Note: In order to receive the text notification emitted for the traffic merge warner, when TrafficMergeWarningOptions.enable_text_notification has been enabled, the sdk.navigation.EventTextListener must be enabled as well. Gets the listener that notifies when a text notification is available.
getter/setter pairinherited
eventTextOptions EventTextOptions
Options used for text notifications. Notifications are only available if a route is present. Gets the text notification options.
getter/setter pairinherited
guidanceFrameRate ↔ int
Frame rate used during guidance. Frame rate used during guidance. Default is 30fps.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
interpolatedLocationListener InterpolatedLocationListener?
Object to receive interpolated locations. For example, to pan a second instance of a MapViewBase or move additional markers smoothly. The map-matched locations are used if available, otherwise the non-map-matched ones are used instead. Defaults to null. Gets the listener that receives interpolated locations. For example, to pan a second instance of a MapViewBase or move additional markers smoothly. The map-matched locations are used if available, otherwise the non-map-matched ones are used instead.
getter/setter pair
isDebugModeEnabled ↔ bool
When enabled, it shows useful information for debugging purposes.
getter/setter pair
isDynamicFrameRateEnabled ↔ bool
Flag used to enable or disable the dynamic frame rate. Controls whether the number of map updates is dynamically calculated based on the current zoom level. If the zoom level is low, i.e., the camera target distance is high, updates to LocationIndicator, MapCamera and MapPolylines representing the route progress will happen less frequent. It is on by default.
getter/setter pair
isEnableTunnelExtrapolation ↔ bool
Defines whether to enable or disable tunnel extrapolation. By default the tunnel extrapolation is enabled. Return true if tunnel extrapolation is enabled otherwise false.
getter/setter pairinherited
isExtrapolationEnabled ↔ bool
Defines whether the position extrapolation logic is enabled or not. The predicted location follows the geometry of the route (or road) ahead. By default it is enabled. Gets the current state of the position extrapolation logic.
getter/setter pair
isLocationAccuracyVisualized ↔ bool
Controls if the halo accuracy visualization of the default LocationIndicator is rendered or not. Does not affect halo accuracy indicator of the VisualNavigator.customLocationIndicator. If VisualNavigator.customLocationIndicator is set, then its halo accuracy indicator can be controlled using LocationIndicator.isAccuracyVisualized. Gets a boolean indicating if the halo accuracy visualization of the default LocationIndicator is rendered or not.
getter/setter pair
isManeuverArrowsVisible ↔ bool
Maneuver arrows visibility which defines whether to perform maneuver arrow rendering during visual navigation. By default, it is enabled. Gets the current state of maneuver arrow rendering during visual navigation.
getter/setter pair
isOffRoadDestinationVisible ↔ bool
Off road destination visibility which defines whether to show a dashed line between the map-matched and the original destination which is off-road. By default it is enabled. Note: The dashed line will be drawn only if the original destination is off-road. Gets the current state of off-road destination visualization during visual navigation.
getter/setter pair
isPassthroughWaypointsHandlingEnabled ↔ bool
Defines whether to enable or disable handling of passthrough waypoints. By default the handling of passthrough waypoints is disabled. Return true if handling of passthrough waypoints is enabled, otherwise - false.
getter/setter pairinherited
isRendering → bool
Returns a value indicating whether visual navigation rendering is enabled. Returns a value indicating whether visual navigation rendering is enabled.
no setter
isRouteProgressVisible ↔ bool
RouteProgress visibility which defines whether to perform route progress coloring ("eat-up") during visual navigation. By default, it is enabled. Gets the current state of route progress during visual navigation.
getter/setter pair
isRouteVisible ↔ bool
Route visibility which defines whether to perform route rendering during visual navigation. When enabled, the set Route will be rendered as a MapPolyline together with MapArrow items that indicate the next turns. By default, it is enabled. When disabled, MapArrow items are still rendered. To hide arrows, use VisualNavigatorColors with transparent color. Gets the current state of route rendering during visual navigation.
getter/setter pair
isTrafficOnRouteVisible ↔ bool
A boolean which defines whether to perform rendering of traffic conditions on the route when Route visualization is enabled during visual navigation. When enabled the route's MapPolyline will be enhanced with visualization of the traffic conditions. Colors used for this visualization are defined in VisualNavigatorColors.trafficOnRouteColors. The presented traffic information is either set by the user via NavigatorInterface.trafficOnRoute or is generated from historical traffic data stored in the map. Note: VisualNavigator does not perform automatic traffic data updates. The updated traffic information is available through the sdk.routing.RoutingEngine.calculate_traffic_on_route interface. The returned TrafficOnRoute could then be used to update sdk.navigation.NavigatorInterface.traffic_on_route to refresh the traffic on route visualization. Defaults to false. Gets the current state whether traffic conditions on route should be displayed during visual navigation.
getter/setter pair
junctionViewLaneAssistanceListener JunctionViewLaneAssistanceListener?
Object to receive junction view lane assistance notifications. Junction view lane assistance notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive junction view lane assistance notifications.
getter/setter pairinherited
lowSpeedZoneWarningListener LowSpeedZoneWarningListener?
Object to receive notifications about low speed zones on the current road. Low speed zone notifications are given regardless if a route is set. This listener is currently available only for Japan. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive notifications about low speed zones on the current road.
getter/setter pairinherited
maneuverArrowWidthFactor ↔ double
A factor of VisualNavigator.measureDependentWidth defining the width of the maneuver arrow. The factor should be positive. A value less than or equal to 0 is ignored. By default it is set to one. Gets the factor that multiplies width of the maneuver arrow defined by VisualNavigator.measureDependentWidth. By default it is set to one.
getter/setter pair
maneuverNotificationOptions ManeuverNotificationOptions
Options used for maneuver notifications. Notifications are only available if a route is present. Gets the maneuver notification options.
getter/setter pairinherited
maneuverViewLaneAssistanceListener ManeuverViewLaneAssistanceListener?
Object to receive maneuver view lane assistance notifications. Maneuver view lane assistance notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive maneuver view lane assistance notifications.
getter/setter pairinherited
measureDependentWidth ↔ Map<MapMeasure, double>
The measureDependentWidth that defines the route and maneuver arrows width. It is a dictionary that has keys that are MapMeasures and values that are width in pixels at this MapMeasures. This route and maneuver arrows width is multiplied by a pixel_scale MapViewBase.pixelScale before being rendered. The maneuver arrow width is additionally multiplied by a factor configurable with VisualNavigator.maneuverArrowWidthFactor; which by default equals one. The function defined by a dictionary is linearly interpolated between each successive pair of data points. For keys below the lowest MapMeasure, its corresponding value width is used. For keys above the highest MapMeasure, its corresponding value width is used. Only MapMeasure of sdk.mapview.MapMeasure.Kind.ZOOM_LEVEL type are supported. MapMeasure of other unsupported types will be ignored. measureDependentWidth with a single entry is equivalent to use of the constant width value of this single entry for all MapMeasures. Empty measureDependentWidth is ignored and existing dictionary of width is maintained. The width values should be positive. Dictionary entries with width values less than or equal to 0 are ignored. If route and maneuver arrows were not configured with this property, then measureDependentWidth contains predefined values chosen to be optimal for different route classes.
getter/setter pair
milestoneStatusListener MilestoneStatusListener?
Object to receive notifications about the arrival at each Milestone or missing it. It informs on all waypoints (passed or missed) that are of type MilestoneType.stopover but excludes the starting waypoint. Waypoints of type MilestoneType.passthrough are excluded, by default, but can be included via NavigatorInterface.isPassthroughWaypointsHandlingEnabled. Milestone status notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener that notifies when a Milestone has been reached or missed.
getter/setter pairinherited
Object to receive notifications about the current location. It returns null when no listener is set by an user. Gets the listener that notifies current location updates.
getter/setter pairinherited
offRoadDestinationReachedListener OffRoadDestinationReachedListener?
Object to receive the notification about the arrival at the off-road destination. Off-road destination reached notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener that notifies when the off-road destination has been reached.
getter/setter pairinherited
offRoadProgressListener OffRoadProgressListener?
Object to receive the notification about the off-road progress. Off-road progress notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener that notifies about off-road progress.
getter/setter pairinherited
postActionListener PostActionListener?
Object to receive post action notifications, such as a charge action at a charging station. Post actions notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive post action notifications, such as a charge action at a charging station.
getter/setter pairinherited
railwayCrossingWarningListener RailwayCrossingWarningListener?
Object to receive notifications about railway crossings on the current road. Railway crossing notifications are given regardless if a route is set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive notifications about railway crossings on the current road.
getter/setter pairinherited
realisticViewWarningListener RealisticViewWarningListener?
Object to receive notifications about junction views on the current road. Setting null value to the listener will unset the listener. This feature requires a map version greater or equal to 67 in order to function properly. It returns null when no listener is set by an user. Gets the listener to receive notifications about junction views on the current road.
getter/setter pairinherited
realisticViewWarningOptions RealisticViewWarningOptions
Realistic view warning options. It allow to filter realistic views to be passed to RealisticViewWarningListener.
getter/setter pairinherited
roadAttributesListener RoadAttributesListener?
Object to receive notifications about attributes of the current road. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive notifications about attributes of the current road.
getter/setter pairinherited
roadSignWarningListener RoadSignWarningListener?
Object to receive notifications about road signs on the current road. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive notifications about road signs on the current road.
getter/setter pairinherited
roadSignWarningOptions RoadSignWarningOptions
Road sign warning options that allow to filter road sings to be passed to RoadSignWarningListener. Gets road sign warning options that allow to filter road signs to be passed to RoadSignWarningListener.
getter/setter pairinherited
roadTextsListener RoadTextsListener?
Object to receive notifications about the textual attributes of the current road. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive notifications about the textual attributes of the current road.
getter/setter pairinherited
route Route?
The route to navigate. Gets and sets the route that is being navigated. If not set, only the current location information will be provided through NavigableLocationListener. If set, both route progress (RouteProgressListener) and route deviation (RouteDeviationListener) will receive notifications on updates. A route may fail to be set if it is generated by an incompatible engine, in which case the operation has no effect. Gets the route that is being navigated.
getter/setter pairinherited
routeDeviationListener RouteDeviationListener?
Object to receive notifications about deviations from the route if any occurs. Route deviation notifications only occurs if a route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener that notifies when deviation from the route is observed.
getter/setter pairinherited
routeDrawOrder ↔ int
The draw order of the polylines representing the route. The draw order of the polylines representing the route. For more details see MapPolyline.drawOrder. The default is 0.
getter/setter pair
routeDrawOrderType DrawOrderType
The draw order type of the polylines representing the route. The draw order type of the polylines representing the route. For more details see MapPolyline.drawOrderType. The default is DrawOrderType.mapSceneAdditionOrderDependent.
getter/setter pair
routeProgressListener RouteProgressListener?
Object to receive notifications about navigation route progress. Route progress notifications only occurs if the route has been set. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener that notifies when a route progress change occurs.
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
safetyCameraWarningListener SafetyCameraWarningListener?
Object to receive safety camera warner notifications. If a listener is present, notifications about safety speed cameras will be also sent via SafetyCameraWarningListener. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive safety camera warning notifications.
getter/setter pairinherited
safetyCameraWarningOptions SafetyCameraWarningOptions
Safety camera warning options to be passed to SafetyCameraWarningListener. These options allow the enabling or disabling the text notification for the warner. Gets safety camera warning options to be passed to SafetyCameraWarningListener.
getter/setter pairinherited
schoolZoneWarningListener SchoolZoneWarningListener?
Object to receive notifications about school zones on the current road. Setting null value to the listener will unset the listener. school zones on the current road. It returns null when no listener is set by an user. Gets the listener to receive notifications about school zones on the current road.
getter/setter pairinherited
schoolZoneWarningOptions SchoolZoneWarningOptions
School zone warning options It allow to configure school zone notifications to be passed to SchoolZoneWarningListener. Gets school zone warning options that allow to configure school zone notifications to be passed to SchoolZoneWarningListener.
getter/setter pairinherited
speedLimitListener SpeedLimitListener?
Object to receive notifications about the speed limit of the current road. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive notifications about the speed limit of the current road.
getter/setter pairinherited
speedWarningListener SpeedWarningListener?
Object to receive notifications when a speed limit on a road is exceeded or driving speed is restored back to normal. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive notifications when a speed limit on a road is exceeded or driving speed is restored back to normal.
getter/setter pairinherited
speedWarningOptions SpeedWarningOptions
Options used for the speed warning feature. Gets the speed warning options.
getter/setter pairinherited
tollStopWarningListener TollStopWarningListener?
Object to receive information on the upcoming toll stop. Setting null value to the listener will unset the listener. This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process. Gets the listener to receive notifications about the the upcoming toll stop.
getter/setter pairinherited
trackingTransportProfile TransportProfile?
Defines the transport profile for the Navigator, when no route is present. Properly setting the transport profile optimizes the navigation experience, and improves resource consumption. For example, a TransportProfile can be defined with a VehicleProfile. A vehicle profile can have several parameters such as VehicleType to set the source of information describing the vehicle. The default is a VehicleType.car profile.
getter/setter pairinherited
trafficMergeWarningListener TrafficMergeWarningListener?
Object to receive notifications about merging traffic to the current road. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive notifications about merging traffic to the current road.
getter/setter pairinherited
trafficMergeWarningOptions TrafficMergeWarningOptions
Merging traffic warning options that allow to configure merging traffic notifications to be passed to TrafficMergeWarningListener. Gets merging traffic warning options that allow to configure merging traffic notifications to be passed to TrafficMergeWarningListener.
getter/setter pairinherited
trafficOnRoute TrafficOnRoute?
Traffic information for the current route. This impacts RouteProgress updates as the duration of the SectionProgress might change. However, the remaining distance and the route geometry will remain unchanged. Gets the traffic information for the current route.
getter/setter pairinherited
truckRestrictionsWarningListener TruckRestrictionsWarningListener?
Object to receive notifications about truck restrictions on the current road. Setting null value to the listener will unset the listener. It returns null when no listener is set by an user. Gets the listener to receive notifications about truck restrictions on the current road.
getter/setter pairinherited
truckRestrictionsWarningOptions TruckRestrictionsWarningOptions
Truck restrictions warning options that allow to filter truck restrictions to be passed to TruckRestrictionsWarningListener. Gets truck restrictions warning options that allow to filter truck restrictions to be passed to TruckRestrictionsWarningListener.
getter/setter pairinherited

Methods

calculateRemainingDistanceInMeters(GeoCoordinates coordinates) → int?
This method calculates the distance between the current position and given coordinates.
inherited
getManeuver(int index) Maneuver?
Returns maneuver at the given index.
inherited
getManeuverNotificationTimingOptionsWithTimingProfile(TransportMode transportMode, TimingProfile timingProfile) ManeuverNotificationTimingOptions
Returns maneuver notification timing options with default values given the combination of transport mode and timing profile.
inherited
getWarningNotificationDistances(WarningType warningType) WarningNotificationDistances
Returns the warning notification distances for the requested warning type.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onLocationUpdated(Location location) → void
Called each time a new location is available.
inherited
repeatLastManeuverNotification() → void
Call of this function is used to trigger the navigator to repeat the last maneuver notification based on the current position.
inherited
setCustomOption(String key, String value) → void
This method sets custom options that controls navigator behavior.
inherited
setManeuverNotificationTimingOptionsWithTimingProfile(TransportMode transportMode, TimingProfile timingProfile, ManeuverNotificationTimingOptions options) → bool
Set timing option values for the combination of transport mode and timing profile.
inherited
setWarningNotificationDistances(WarningType warningType, WarningNotificationDistances warningNotificationDistances) → bool
Set the warning notification distances for the specified warning types.
inherited
startRendering(MapViewBase mapView) → void
Starts visual navigation rendering.
stopRendering() → void
Stops visual navigation rendering.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

defaultRouteManeuverArrowMeasureDependentWidths() → Map<MapMeasure, double>
Retrieves a dictionary of default route and maneuver arrow widths as a function of MapMeasures.
getAvailableLanguagesForManeuverNotifications() → List<LanguageCode>
Returns the list of languages for maneuver notification currently available in the SDK.