Contents:
This call retrieves information in an infrastructure dataset.
Data returned is licensed as per the respective owners.
The TfL Cycling Infrastructure Database map is an example use of this API call.
Data is currently limited to a maximum of 5,000 locations per request. Given the high volume of data for some datasets, application developers are strongly recommended to enforce a high zoom level in their user interface to avoid poor browser performance.
Example which retrieves infrastructure locations data.
https://api.cyclestreets.net/v2/infrastructure.locations?dataset=tflcid&type=cycle_parking&bbox=-0.119307,51.509784,-0.117435,51.509995
Result:
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "_type": "cycle_parking", "type": "sheffield", "capacity": 2, "osm_id": 476102903, "images": [], "iconUrl": "https://www.example.com/images/icons/point.svg" }, "geometry": { "type": "Point", "coordinates": [ -0.118422, 51.509905 ] } }, { "type": "Feature", "properties": { "_type": "cycle_parking", "type": "box", "capacity": 4, "osm_id": 476102903, "images": [], "iconUrl": "https://www.example.com/images/icons/point.svg" }, "geometry": { "type": "Point", "coordinates": [ -0.118374, 51.509920 ] } } ] }
Filter to fields in the data, e.g. field:cycle_parking=box
would add this as a search constraint. This is useful for advanced search interfaces.
If values are comma-separated, they will be treated as an OR list, e.g. field:severity=slight,serious would match records with a property 'severity' whose value is either 'slight' or 'serious'.
Fieldnames match those shown in the infrastructure.schema API call output.
Sets the output format. Not normally required except in the use-case of requiring an export. The appropriate HTTP headers will be sent. Available values are:
fields
order will be respected.JSON structure as per example above.
JSON object containing an error key and a text string.
Example error (text string may vary):
{ "error": "No bbox parameter was supplied." }