TransitRouteOptions class
All the options to specify how a public transit route should be calculated.
Constructors
Properties
- alternatives ↔ int
-
Number of alternative routes to return aside from the optimal route.
The provided value must be in the range [0, 6].
By default, it is 0 and only one route is calculated.
getter/setter pair
- arrivalTime ↔ DateTime?
-
Optional time when travel is expected to end.
getter/setter pair
- changes ↔ int?
-
Maximum number of changes or transfers allowed in a route.
When it is not set, unlimited number of changes is permitted.
The provided value must be in the range [0, 6].
getter/setter pair
- departureTime ↔ DateTime?
-
Optional time when travel is expected to start.
If it is not specified, it is set to the current time.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setter
- modeFilter ↔ TransitModeFilter
-
Defines inclusion or exclusion of transit modes for route calculation.
By default, the inclusion mode is used.
getter/setter pair
-
modes
↔ List<
TransitMode> -
This list is used to determine which transit modes should be used for route calculation,
TransitRouteOptions.modeFilter specifies whether this list is an inclusion or an exclusion.
For example, specifying subway and bus transit modes with the include filter, returns only subway
and bus transit modes, and with the exclude filter, returns all the transit modes except subway
and bus. When not set, all the supported transit modes are permitted.
By default, this list is empty.
getter/setter pair
- pedestrianMaxDistanceInMeters ↔ int
-
Maximum allowed walking distance in meters (e.g. when looking for nearest stations).
The provided value must be in the range [0, 6000].
The default value is 2000 meters.
getter/setter pair
- pedestrianSpeedInMetersPerSecond ↔ double
-
Walking speed in meters per second. Influences the duration of walking segments from origin to a station,
from a station to destination and in-between the stations (e.g. if transfer is needed).
The provided value must be in the range [0.5, 2.0].
The default value is 1.0 mps.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textOptions ↔ RouteTextOptions
-
Customize textual content returned from the route calculation, such
as localization, format, and unit system.
getter/setter pair
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.
Static Methods
-
fromDefaultParameterConfiguration(
) → TransitRouteOptions - Returns TransitRouteOptions instance with default values used in SDK.