Navigation topic

Navigation provides real-time turn-by-turn guidance, speed-limit awareness, and event-driven navigation hooks to build production-ready navigation experiences. Use these capabilities to run live guidance, provide events related to the current navigation and simulate navigation for testing and demonstration.

  • NavigationService: Use this high-level API to start, stop, and manage navigation sessions (real or simulated). It coordinates route-based navigation, registers listeners for navigation events, and streams instruction and TTS events for UI and voice systems.
  • NavigationInstruction: Use this data-rich object to represent the current guidance at the device position. It contains human-readable instructions, distance and timing metrics, turn details, and lookahead information for UI and voice presentation.
  • NextSpeedLimit: Use this compact value object to represent upcoming speed-limit changes along the route. It supplies the location, distance to the change, and the new limit value for lookahead logic, warnings, and UI indicators.

These components work together to deliver precise, timely navigation: NavigationService manages session state and event streaming, NavigationInstruction provides step-level guidance, and NextSpeedLimit enables proactive speed-awareness. Together they support reliable instruction timing, reduced driver distraction, and flexible simulation workflows.

Typical workflow: initialize NavigationService with a route, subscribe to instruction and event streams, and render NavigationInstruction objects in your UI or voice systems. Use NextSpeedLimit for lookahead warnings and prefer simulation modes when testing to validate UI and logic without live movement.

Learn more about navigation: https://developer.magiclane.com/docs/flutter/guides/category/navigation

Classes

Real-time turn-by-turn navigation instruction for active navigation sessions.
Manage turn-by-turn navigation and simulation on routes.
NextSpeedLimit Navigation
Speed limit variation data.

Enums

Navigation instruction update event types.
Navigation state enumeration.
NextSpeedLimitStatus Navigation
The status of a NextSpeedLimit item