The transit modes allows you to specify (using the
prod 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 the request. Currently a total of nine (9) modes of transit (trains, buses, ferries, trams, etc.) are supported, with up to 14 unique vehicle types.
prod parameter is constructed using a 16-bit binary number, where the most significant bit represents the High-speed Trains.
|2||Inter-regional and fast trains|
|3||Regional and other trains|
|15||Not yet defined|
These examples show which vehicle types should be included in the response for different
prod values (note the indexing is 0-based):
- 1111111111111111 - all supported vehicle types
- 0100010010000000 - Intercity/EuroCity Trains (1-st bit), Buses (5-th bit) and Trams (8-th bit) only
- 0000010000000000 - Buses (5-th bit) only
- 1000000100000100 - High-speed Trains (0-th bit), Metros/Subways (7-th bit) and Monorails (13-th bit) only