RouteConfiguration
Constructors
RouteConfiguration.new
RouteConfiguration.new({required dynamic initialLocation, required dynamic finalLocation, String mapId = '', bool preferAccessibleRoute = false, String? nextStepsRouteColor = '#33B5E5', String? prevStepsRouteColor = '#aaaaaa', double polylineWidth = 10, dynamic nextStepsRouteStyle, dynamic prevStepsRouteStyle, String? language = 'es', String? unitSystem = 'METRIC', String? announceFormat = 'RELATIVE'})Configuration for creating routes on the map with enhanced origin handling. const
Properties
| Property | Type | Description |
|---|---|---|
announceFormat | String? | Format for route announcements (‘RELATIVE’ or ‘ABSOLUTE’). Defaults to ‘RELATIVE’. (final) |
finalLocation | dynamic | Final destination for the route. Can be either a LzLocation object or a place ID string. This is required for route creation. (final) |
initialLocation | dynamic | Starting location for the route. Can be either a LzLocation object or a place ID string. If null or not provided, the system will use the user’s current location as fallback. (final) |
language | String? | Language for route instructions (e.g., ‘es’, ‘en’, ‘fr’). Defaults to ‘es’. (final) |
mapId | String | Identifier of the target map where the route will be displayed. (final) |
nextStepsRouteColor | String? | Color for the next steps of the route in hexadecimal format (e.g., ‘#FF0000’). Defaults to ‘#33B5E5’. (final) |
nextStepsRouteStyle | dynamic | Style configuration for the next steps of the route. Can be used for advanced styling options. (final) |
polylineWidth | double | Width of the route polyline in pixels. Defaults to 10. (final) |
preferAccessibleRoute | bool | Whether to prefer accessible routes (e.g., avoiding stairs, using ramps). Defaults to false. (final) |
prevStepsRouteColor | String? | Color for the previous steps of the route in hexadecimal format (e.g., ‘#CCCCCC’). Defaults to ‘#aaaaaa’. (final) |
prevStepsRouteStyle | dynamic | Style configuration for the previous steps of the route. Can be used for advanced styling options. (final) |
unitSystem | String? | Unit system for distances (‘METRIC’ or ‘IMPERIAL’). Defaults to ‘METRIC’. (final) |
Methods
toJson
toJson() → Map<String, Object?>Last updated on