Request a walking route from A to B and display it on the map.
This example calculates a walking route from St Paul's Cathedral in London (51.5141°N, 0.0999°W) to the Tate Modern (51.5081°N, 0.0985°W) on the south bank of the River Thames using pedestrian routing and displays it on the map. The calculation finds the shortest available walking route, which in this case directs the user to use the pedestrian only Millennium Footbridge.
Access to the routing service is obtained from the H.service.Platform
by calling
getRoutingService(null, 8)
. The calculateRoute()
method is used to calculate the shortest
pedestrian route by passing in the relevant parameters as defined in
Routing API.
The styling and display of the response is under the control of the developer.