Route class - routing library - Dart API
Route
Route class abstract
A route is a path through a road network over which someone travels.
Note: Each Section of a route contains a list of SectionNotice objects that describe potential issues after the route was calculated. If the list is non-empty, it is recommended to evaluate possible violations against the requested route options and reject the route if deemed necessary.
Constructors
- Route()
Properties
- boundingBox → GeoBox
-
The closest rectangular area where this route fits in.
Gets the closest rectangular area where this route fits in.
no setter
- consumptionInKilowattHours → double?
-
Estimated net energy consumption (in kWh) if the transportation mode used for this route
is an electric vehicle. Note that it can be negative due to energy recuperation.
Gets estimated net energy consumption (in kWh) if the transportation mode used for this route
is an electric vehicle. Note that it can be negative due to energy recuperation.
no setter
- duration → Duration
-
The estimated time in seconds needed to travel along this route, including
real-time traffic delays if available.
Gets the estimated time in seconds needed to travel along this route, including
real-time traffic delays if available.
no setter
- geometry → GeoPolyline
-
The GeoPolyline object representing the polyline of this route. It may not contain the original
coordinates specified in the request for a route.
Gets the GeoPolyline object representing the polyline of this route. It may not contain the original
coordinates specified in the request for a route.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- language → LanguageCode
-
Indicates the language requested for all textual information related to this route.
Gets the language requested for all textual information related to this route.
no setter
- lengthInMeters → int
-
The length of this route in meters.
Gets the length of this route in meters.
no setter
- optimizationMode → OptimizationMode
-
The optimization mode requested for route calculation.
Gets the optimization mode requested for route calculation.
no setter
-
railwayCrossings
→ List<
RouteRailwayCrossing> -
Collection of railway crossings along the route.
Railway crossing information is only available for routes created with the online
RoutingEngine. Gets railway crossings.no setter - requestedTransportMode → TransportMode
-
The transport mode requested for route calculation.
Gets the transport mode requested for route calculation.
no setter
- routeHandle → RouteHandle?
-
The route handle of this route. Note that it is provided only if
RouteOptions.enableRouteHandle is set before route calculation.
Gets the route handle of this route. Note that it is provided only if
RouteOptions.enableRouteHandle is set before route calculation.
no setter
-
routeLabels
→ List<
RouteLabel> -
A collection containing a maximum of 2
RouteLabelinstances for the route. It will return an empty list if no labels are available. The main street names or route numbers through which the route is going to pass that differentiate it from other alternatives routes. The labels are ordered by importance based on how much time the route spends on each road segment, not by traversal sequence. This helps users quickly identify and distinguish between different route alternatives when alternative routes have been quested viaRouteOptions. Gets route labels.no setter - routingOptions → RoutingOptions?
-
The set of options used to calculate the route.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors.
Related APIs may change for new releases without a deprecation process.
Gets the options used to calculate this route.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sections
→ List<
Section> -
The sections that make up this route.
Gets the sections that make up this route.
no setter
- trafficDelay → Duration
-
The estimated time in seconds spent in traffic along this route. Negative values
indicate that the route can be traversed faster than usual.
Gets the estimated time in seconds spent in traffic along this route. Negative values
indicate that the route can be traversed faster than usual.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
deserialize(
Uint8List routeData) → Route? - Creates route from the given binary data.
-
serialize(
Route route) → Uint8List? - Serializes given route to a binary data.