Use this endpoint to list the closest major intersections (within 10km) to a given point.
As of 2020-03-26, intersections involving controlled-access freeways, as well as intersections involving only local streets, are not returned.
Payload details:
highway
) to lowest (local street
); as such, if only two streets are needed, the first two will generally be the best to use.lat
/lng
is provided in the distance key. As of 2020-03-26, only straight_line
(linear, Euclidean) distances will be returned, rather than distances through the street network. Technicality: the straight-line distance is actually the geodesic / great-circle distance.GET /intersections
Parameter | Status | Description |
---|---|---|
lat | required | A decimal number between -90 and 90 (latitude) |
lng | required | A decimal number between -180 and 180 (longitude) |
key | required | The API Key provided for you |
require('request')({method: 'GET',url: 'https://api.locallogic.co/v1/intersections',qs: {lat: 49.26312,lng:-123.09855,limit: 1},headers: {'X-API-KEY': 'API_KEY'}}, function (err, response, body) {// See response example})
{"data": {"type": "intersections","attributes": {"intersections": [{"streets": [{"name": "Scotia Street","class": "Local"},{"name": "East Broadway","class": "Major artery"}],"geometry": {"lng": -123.09898499999997,"lat": 49.26285259900004},"distance": {"units": "meters","straight_line": 43}}]}},"meta": {"code": "LocalLogic.API.Success","detail": "Successfully found one or more intersections"}}