Transit Modes
The transit modes allow you to specify (using the modes
request parameter) various types of vehicles that you wish to be included in the transit routing results. By default, all types of transits are supported if this parameter is omitted in a request. Currently a total of nine (9) modes of transit (trains, buses, ferries, trams, and others) are supported, with up to 14 unique vehicle types.
modes
parameter is constructed using a string, where the modes specified by name separated by commas. There are two possible format: - name_1,name_2,...,name_N - enable specified vehicle types and disable everything else
- -name_1,-name_2,...,-name_N - disable specified vehicle types and enabled everything else
Code | Name | Vehicle Types |
---|---|---|
0 | high_speed_train | High-speed Trains |
1 | intercity_train | Intercity/EuroCity Trains |
2 | inter_regional_train | Inter-regional and fast trains |
3 | regional_train | Regional and other trains |
4 | city_train | City trains |
5 | bus | Buses |
6 | ferry | Boats/Ferries |
7 | subway | Metros/Subways |
8 | light_rail | Trams |
9 | private_bus | Ordered services/Taxis |
10 | inclined | Inclined/Funiculars |
11 | aerial | Aerials/Cable Cars |
12 | bus_rapid | Rapid Buses |
13 | monorail | Monorails |
14 | flight | Airplanes |
20 | walk | Walk |
The examples below show which vehicle types should be included in the response for different modes
values:
- all or the absent of the parameter - all supported vehicle types
- intercity_train,bus,light_rail - Intercity/EuroCity Trains (code 1), Buses (code 5) and Trams (code 8) only
- subway,bus - Metros/Subways (code 7) and Buses (code 5) only
- -bus - all types except Buses (code 5)
- -high_speed_train,-subway,-monorail - all types except High-speed Trains (code 0), Metros/Subways (code 7) and Monorails (code 13)