Routing topic
The routing subsystem provides everything apps need to calculate routes ready for presentation and navigation. It exposes a single, asynchronous route calculation service and a set of configuration objects, profiles and helpers that let you express transport mode, vehicle constraints, avoidance rules, terrain and round‑trip preferences, and social overlays for crowd-sourced reports. Use these components together to compute navigable paths, reachable areas (ranges), and rich route metadata suitable for turn‑by‑turn navigation and map display.
RoutingService: The core static service for asynchronous route calculation and navigation planning. Initiates route computations, returns cancellable handlers, reports status and transfer statistics, and provides utilities for user road blocks and recalculation control.RoutePreferences: Central configuration object that controls how routes are computed. Covers transport mode, algorithm choices, avoidance flags (tolls, ferries, motorways, unpaved), profile overrides, result detail levels, and public‑transport timing and sorting options.VehicleRegistration,MotorVehicleProfile,CarProfile,TruckProfile,ElectricBikeProfile: Vehicle and profile models that encode vehicle dimensions, mass, fuel/type and e‑bike specifics. Attach these toRoutePreferencesto ensure routing respects vehicle constraints and legal limits.BuildTerrainProfile: Small preferences object that toggles generation of elevation/terrain profiles for routes, useful for elevation tables and charts.RoundTripParameters: Parameters for generating round‑trip routes.DepartureHeading: Optional heading constraint applied at the route origin to influence initial routing direction.TollSection: Lightweight model representing tolled stretches of a route, including start/end distances and estimated cost/currency data.
Routing is central to any navigation-capable app. The SDK’s routing layer separates policy (preferences and profiles) from execution (the RoutingService) so applications can build precise, compliant routes across vehicle classes, adapt to online/offline capabilities, and surface rich metadata (terrain, tolls, transfer statistics) for UX and billing decisions.
Learn more about routing: https://developer.magiclane.com/docs/flutter/guides/category/routing
Classes
- BikeProfileElectricBikeProfile Routing
- Bike and electric bike routing profile.
- BuildTerrainProfile Routing
- Preferences regarding building terrain profile
- CarProfile Routing
- Car routing profile.
- DepartureHeading Routing
- Departure heading
- ElectricBikeProfile Routing
- Electric bike profile containing e-bike configuration and rider/vehicle parameters.
- MotorVehicleProfile Routing
- Motor vehicle profile.
- RoundTripParameters Routing
- Round trip parameters
- RoutePreferences Routing
- Comprehensive route calculation configuration for customizing routing behavior.
- RoutingService Routing
- Static service for asynchronous route calculation and navigation planning.
- TruckProfile Routing
- Truck routing profile.
- VehicleRegistration Routing
- Vehicle registration information.
Enums
- BikeProfile Routing
- Bike profile selection used for bicycle routing.
- ElectricBikeType Routing
- Electric bike drivetrain type.
- EVChargingConnector Routing
- Electric vehicle charging connector type
- FuelType Routing
- Fuel type for motorized vehicles.
- PedestrianProfile Routing
- Pedestrian profile
- PTAlgorithmType Routing
- Algorithm type
- PTSortingStrategy Routing
- Sorting strategy
- RangeType Routing
- Range type to define ranges in.
- RouteAlternativesSchema Routing
- Alternative routes scheme
- RoutePathAlgorithm Routing
- Path calculation algorithm
- RoutePathAlgorithmFlavor Routing
- Path calculation flavors
- RouteResultDetails Routing
- Routing result details
- RouteResultType Routing
- Route result
- RouteTransportMode Routing
- Transport mode
- RouteType Routing
- Route type
- RouteTypePreferences Routing
- Route type preference
- TrafficAvoidance Routing
- Traffic avoidance options