Using the Navigation Data Source¶
The Navigation Data Source provides information about the navigation state, such as turn-by-turn instructions.
Learn how to use the Navigation Data Source by completing a tutorial. See Tutorial: Route progress and navigation instructions.
Tip
The Kanzi Maps assets include the KanziMaps_Navigation Navigation Data Source. See Using the Kanzi Maps assets.
To create a Navigation Data Source:
In the Data Sources window, click Create Data Source and set the Data Source Type to Kanzi.Maps.NavigationDataSource.
Next to the Navigation Data Source that you created, click to create these data objects:
WorldPositionX contains the latitude coordinate of a world position in target projection meters.
WorldPositionZ contains the longitude coordinate of a world position in target projection meters.
WorldPosition2cmX: contains the latitude coordinate of a world position in target projection meters multiplied by 50, that is, in project 2cm coordinates.
WorldPosition2cmZ: contains the longitude coordinate of a world position in target projection meters multiplied by 50, that is, in project 2cm coordinates.
WorldPositionLat contains the latitude coordinate of a world position.
WorldPositionLon contains the longitude coordinate of a world position.
WorldPositionLatLon contains the latitude-longitude coordinates of a world position in string format. For example, “30.0,50.4”.
WorldRotationY contains a rotation clockwise from north in radians.
RouteLength contains the total length of a route in meters.
RouteTime contains the estimated travel time of a route in seconds.
RouteGeometryLength contains the total length of a route geometry.
RouteGeometryOffset contains the traveled distance along route geometry from the start of the route.
To calculate route progress relative to the rendered geometry, use the RouteGeometryLength and RouteGeometryOffset.
RouteOffset contains the traveled distance along a route from the start of the route.
RouteTimeOffset contains the traveled time on a route from start. The time is based on the estimated value.
ManeuverDistance contains the distance to the next maneuver in meters.
NextStep contains data about the next navigation step:
Maneuver contains the next navigation maneuver of the next step. See Navigation maneuvers.
ManeuverInstruction contains a human-readable maneuver instruction.
ManeuverModifier contains a maneuver modifier. See Maneuver modifiers.
StepGeometry contains the geometry for the next step in GeoJSON format. In the Route Renderer node, the Route Geometry property uses this.
CurrentRoad contains the road name of the next step.
StepLatLon contains the latitude-longitude coordinates of the next step in string format.
Maneuver contains the next navigation maneuver. See Navigation maneuvers.
ManeuverInstruction contains a human-readable maneuver instruction.
ManeuverModifier contains a maneuver modifier. See Maneuver modifiers.
StepGeometry contains the geometry for the current navigation step in GeoJSON format. In the Route Renderer node, the Route Geometry property uses this.
CurrentRoad contains the road name of the current navigation step.
StepLatLon contains the latitude-longitude coordinates of the current navigation step in string format.
RemainingSteps contains a list of remaining step items:
instruction contains human-readable maneuver instructions.
maneuver contains the navigation maneuver at the end of this step.
modifier contains a maneuver modifier. See Maneuver modifiers.
road contains the road name of the current step.
geometry contains the geometry for the next step in GeoJSON format. In the Route Renderer node, the Route Geometry property uses this.
duration contains the duration of the step in seconds.
length contains the length of the step in meters.
FirstWaypoint contains a human-readable name of the first waypoint on a route. This is typically an address.
Lat contains the latitude coordinate of the first waypoint.
Long contains the longitude coordinate of the first waypoint.
LatLonString contains the latitude-longitude coordinates of the first waypoint in string format.
LastWaypoint contains a human-readable name of the last waypoint on a route. This is typically an address.
Lat contains the latitude coordinate of the last waypoint.
Long contains the longitude coordinate of the last waypoint.
LatLonString contains the latitude-longitude coordinates of the last waypoint in string format.
You can use these actions to control the simulation and routing of navigation:
Set Route Waypoint sets a route waypoint as a WGS85 latitude-longitude coordinates.
In the Action, set the Waypoint Index property to 0 for the start waypoint and to 1 for the last waypoint.
Set Route Snap Radius sets radius in meters within which the current GPS location is on the route. The default is 20 meters.
Set Car Location for Navigation (WGS84 lat/lon) sets the location of the car in WGS84 latitude-longitude coordinates, including the heading of the car.
Set Car Location for Navigation (Proj 2cm) sets the location of the car in projected 2 cm coordinates, including the heading of the car.
Set Car Location for Navigation (Proj meter) sets the location of the car in projected meter coordinates, including the heading of the car.
Set Navigation Simulation State sets the state of the navigation simulation.
In the action, set the Simulation State to:
Reset to reset the location of the car to the start of the route and stop the simulation.
Pause to pause the simulation retaining the location of the car.
Start/Continue to start or continue the simulation.
Set Navigation Simulation Speed and Time Scale sets the speed of the navigation simulation.
In the action, set:
Simulation Speed Scale to the value by which you want to multiply the speed of the car.
Simulation Time Scale to the value by which you want to multiply the simulation time. This value does not affect the reported speed.
Navigation maneuvers¶
These navigation maneuvers are available:
Maneuver |
Description |
---|---|
NEW_NAME |
No turn is taken or possible to take, but the name of the road changes. The road itself can take a turn. |
TURN |
Turn to the direction indicated by the maneuver modifier. See Maneuver modifiers. |
DEPART |
The departure of the leg of a route. |
ARRIVE |
The destination of the leg of a route. |
MERGE |
Merge onto a street. |
ON_RAMP |
Take a ramp to enter a highway. The maneuver modifier indicates the direction. |
OFF_RAMP |
Take a ramp to exit a highway. The maneuver modifier indicates the direction. |
FORK |
The the left or right side at a fork. The maneuver modifier indicates the direction. |
END_OF_ROAD |
The road ends in a T intersection. |
CONTINUE |
Turn in the direction indicated by the maneuver modifier to stay on the same road. |
ROUNDABOUT |
Traverse a roundabout. |
ROTARY |
A traffic circle. |
ROUNDABOUT_TURN |
A turn at a small roundabout. The maneuver modifier indicates the direction of the turn. |
NOTIFICATION |
A change in driving conditions. |
Maneuver modifiers¶
These maneuver modifiers are available:
Maneuver modifier |
Description |
---|---|
UTURN |
A reversal of direction. |
SHARP_RIGHT |
A sharp turn to the right. |
RIGHT |
A normal turn to the right. |
SLIGHT_RIGHT |
A slight turn to the right. |
STRAIGHT |
No relevant change in direction. |
SLIGHT_LEFT |
A slight turn to the left. |
LEFT |
A normal turn to the left. |
SHARP_LEFT |
A sharp turn to the left. |
See also¶
Tutorial: Route progress and navigation instructions