Contents:
This API call plans a circular, leisure-orientated route [example] which starts and finishes at the same points. An example use case is of a user with two hours to spare and would like ideas for a ride.
This type of routing is only available by arrangement. You must contact us before using this API call. Unauthorised implementations are at the risk of termination of an API key. This API call is normally a charged-for option, but we may make exceptions for community projects.
They are planned based on a suggested distance or duration, though currently the actual distance or duration of the suggested route will only be a rather rough approximation to that requested.
Preferred types of points of interest can be specified so that the route will favour these where possible.
For leisure routes, the CycleStreets planner tries eight routes in different directions around the start point. The quietest of these eight routes is returned as the result, but the other results are also available and can be presented to the end user.
The following is based on: a two-hour leisure route from Buckingham Palace.
https://www.cyclestreets.net/api/journey.json?key=registeredapikey&plan=leisure&itinerarypoints=-0.14009,51.50202,Buckingham+Palace&duration=7200
(Legacy support for XML is also available using .xml rather than .json.)
The response is based on the same layout as A-B journey requests. However, in addition:
These contain points of interest, POIs (if found) near to the requested waypoints.
Example for POIs section of response:
poi: [ { @attributes: { poitypeId: "parks", name: "Waterlow Park", website: "", longitude: "-0.14573", latitude: "51.57023", sequenceId: "2" } }, { @attributes: { poitypeId: "parks", name: "Jack Cornwall Park", website: "", longitude: "-0.01238", latitude: "51.56915", sequenceId: "3" } }, { @attributes: { poitypeId: "parks", name: "Robin Hood Gardens", website: "", longitude: "-0.00834", latitude: "51.50969", sequenceId: "4" } } ]