TransitRouteOptions (API Reference)
Class TransitRouteOptions
All the options to specify how a public transit route should be calculated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionintNumber of alternative routes to return aside from the optimal route.Optional time when travel is expected to end.Maximum number of changes or transfers allowed in a route.Optional time when travel is expected to start.Defines inclusion or exclusion of transit modes for route calculation.This list is used to determine which transit modes should be used for route calculation,modeFilterspecifies whether this list is an inclusion or an exclusion.intMaximum allowed walking distance in meters (e.g.doubleWalking speed in meters per second.Customize textual content returned from the route calculation, such as localization, format, and unit system. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic TransitRouteOptionsReturns TransitRouteOptions instance with default values used in SDK.inthashCode()
-
Field Details
-
departureTime
Optional time when travel is expected to start. If it is not specified, it is set to the current time.
-
arrivalTime
Optional time when travel is expected to end.
-
alternatives
public int alternativesNumber 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.
-
changes
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].
-
modeFilter
Defines inclusion or exclusion of transit modes for route calculation. By default, the inclusion mode is used.
-
modes
This list is used to determine which transit modes should be used for route calculation,
modeFilterspecifies 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. -
pedestrianSpeedInMetersPerSecond
public double pedestrianSpeedInMetersPerSecondWalking 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.
-
pedestrianMaxDistanceInMeters
public int pedestrianMaxDistanceInMetersMaximum 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.
-
textOptions
Customize textual content returned from the route calculation, such as localization, format, and unit system.
-
-
Constructor Details
-
TransitRouteOptions
public TransitRouteOptions()Creates a new instance.
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
fromDefaultParameterConfiguration
Returns TransitRouteOptions instance with default values used in SDK.
- Returns:
An
TransitRouteOptionsinstance with default values used in SDK.
-