NavigationInstruction class Routes & Navigation

Real-time turn-by-turn navigation instruction for active navigation sessions.

Cannot be instantiated directly; instances are provided automatically by the SDK during navigation or simulation via NavigationService callbacks. Access instructions through startNavigation or startSimulation callbacks, or retrieve the current instruction using NavigationService.getNavigationInstruction (requires an active navigation/simulation session).

Provides comprehensive real-time guidance including:

  • Current and upcoming road/street details (names, speed limits, country codes)
  • Turn-by-turn instructions with schematic and detailed geometry images
  • Lane guidance images for complex intersections
  • Time and distance to upcoming turns, waypoints, and destination
  • Signpost information for highway navigation
  • Return-to-route guidance when off-route

NavigationInstruction is real-time and updates as the user navigates, whereas RouteInstruction is static and available immediately after route calculation. Use NavigationInstruction for live navigation UI and RouteInstruction for route preview/overview.

Example

NavigationService.startNavigation(
  route,
  onNavigationInstruction: (instruction, events) {
    // Use the instruction object
  },
);

See also:

Properties

currentCountryCodeISO String
ISO 3166-1 alpha-3 country code for the current road segment.
no setter
currentPosition GemPosition?
Current position during navigation.
no setter
currentRoadInformation List<RoadInfo>
Current road information list.
no setter
currentStreetName String
Current street name.
no setter
currentStreetSpeedLimit double
Maximum speed limit on the current street in meters per second.
no setter
driveSide DriveSide
Drive side for the current road.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasNextNextTurnInfo bool
Check if next-next turn information is available.
no setter
hasNextTurnInfo bool
Check if next turn information is available.
no setter
hasRegisteredAutoReleaseObject bool
getter/setter pairinherited
hasSignpostInfo bool
Whether signpost information is available.
no setter
instructionIndex int
Index of the current route instruction on the current RouteSegment.
no setter
laneImg LaneImg
Get the vectorial lane image as a LaneImg.
no setter
Navigation session route.
no setter
Current navigation or simulation status.
no setter
nextCountryCodeISO String
ISO 3166-1 alpha-3 country code for the next road segment.
no setter
nextInstruction RouteInstruction?
Next route instruction on the route.
no setter
nextNextInstruction RouteInstruction?
Instruction after the next one on the route.
no setter
nextNextRoadInformation List<RoadInfo>
Road information two segments ahead.
no setter
nextNextStreetName String
Street name for the road after the next turn.
no setter
nextNextTurnDetails TurnDetails?
Full details for the turn after the next one.
no setter
nextNextTurnImg Img
Get the image of the turn after the next one as a Img.
no setter
nextNextTurnInstruction String
Textual description for the turn after the next one.
no setter
nextRoadInformation List<RoadInfo>
Next road information list.
no setter
nextStreetName String
Street name for the road after the next turn.
no setter
nextTurnDetails TurnDetails?
Full details for the immediate next turn.
no setter
nextTurnImg Img
Get the image of the immediate next turn as a Img.
no setter
nextTurnInstruction String
Textual description for the immediate next turn.
no setter
pointerId int
The pointer ID of the native object
no setterinherited
previousInstruction RouteInstruction?
Previous route instruction on the route.
no setter
remainingTravelTimeDistance TimeDistance
Remaining travel time and distance to the final destination.
no setter
remainingTravelTimeDistanceToNextWaypoint TimeDistance
Remaining travel time and distance to the next waypoint.
no setter
returnToRouteImage AbstractGeometryImg
Get the vectorial representation for the return-to-route image as a AbstractGeometryImg.
no setter
returnToRoutePosition Coordinates?
Closest position on route when waiting to return to route.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
segmentIndex int
Current instruction segment index.
no setter
signpostDetails SignpostDetails?
Extended signpost details.
no setter
signpostInstruction String
Textual signpost instruction.
no setter
timeDistanceToNextNextTurn TimeDistance
Time and distance to next-next turn.
no setter
timeDistanceToNextTurn TimeDistance
Time and distance to next turn.
no setter
traveledTimeDistance TimeDistance
Traveled time and distance.
no setter

Methods

dispose() → void
Disposes the native object.
inherited
exportAs({PathFileFormat fileFormat = PathFileFormat.packedGeometry}) Uint8List
Export navigation instruction data.
getLaneImage({Size? size, ImageFileFormat? format, LaneImageRenderSettings renderSettings = const LaneImageRenderSettings(), bool allowResize = false}) Uint8List?
Lane configuration image for the current position.
getNextNextTurnImage({Size? size, ImageFileFormat? format}) Uint8List?
Simplified schematic image for the turn after the next one.
getNextSpeedLimitVariation({int checkDistance = 2147483647}) NextSpeedLimit
Next speed limit variation within a specified distance.
getNextTurnImage({Size? size, ImageFileFormat? format}) Uint8List?
Simplified schematic image for the immediate next turn.
getRoadInfoImg(List<RoadInfo> info) Img
Get the road info image as a Img.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerAutoReleaseObject(int pointerId) → void
Registers an object for auto release.
inherited
toString() String
A string representation of this object.
inherited

Operators

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