modes property
Specifies one or more preferred modes of transit. This parameter may only be specified for transit directions. The parameter supports the following arguments:
bus
indicates that the calculated route should prefer travel by bus.subway
indicates that the calculated route should prefer travel by subway.train
indicates that the calculated route should prefer travel by train.tram
indicates that the calculated route should prefer travel by tram and light rail.rail
indicates that the calculated route should prefer travel by train, tram, light rail, and subway. This is equivalent totransitMode=train|tram|subway
.
Implementation
final List<TransitMode>? modes;