Request a Public Transport Route (Deprecated)
To request a public transport route, using the CalculateRoute
service, include in the request the following:
- your authentication credentials,
apiKey
orapp_id
andapp_code
if you are using the app_id/app_code authentication (see the Identity & Access Management Developer Guide) - the start (
waypoint0
) and destination (waypoint1
) waypoints - a
departure
time - and a public transport routing
mode
Additionally, we recommend also including the combineChange
request parameter, which includes change
maneuvers in the response where the user must switch transit lines, as opposed to enter
and leave
maneuver combinations.
This is an example request for the fastest route using estimated public transport routing. It includes the elements above, specifying the waypoints in latitude and longitude by using the geo!
string value.
https://route.ls.hereapi.com/routing/7.2/calculateroute.json
?apiKey={YOUR_API_KEY}
&waypoint0=geo!52.530,13.326
&waypoint1=geo!52.513,13.407
&departure=now
&mode=fastest;publicTransport
&combineChange=true