MapQuest.js

L.mapquest.directions().findLinkId(options, callback)

A class that acts as an interface to the MapQuest Find Link ID API. The results of the API call will be passed in the error-first callback style.

Syntax

L.mapquest.key = 'KEY';

var directions = L.mapquest.directions();
directions.findLinkId({
  'lat': 40.0755,
  'lng': -76.329999
}, findLinkIdCallback);

function findLinkIdCallback(error, response) {
  console.log(response);
}

Response

{
  "linkId": 37214459,
  "street": "Granite Run Dr",
  "info": {
    "copyright": {
      "text": "© 2017 MapQuest, Inc.",
      "imageUrl": "http://api.mqcdn.com/res/mqlogo.gif",
      "imageAltText": "© 2017 MapQuest, Inc."
    },
    "statuscode": 0,
    "messages": []
  }
}