Provides access to various MapQuest APIs
npm install mapquest-apimapquest-api
============
Provides access to the various Open MapQuest Web Services and APIs.
You can then specify the key, using one of the following methods:
* Set the environment variable MAPQUEST_API_KEY; or
* Pass as the key property in any options.
Get straight to work:
var mq = require('mapquest-api');
If you only want to use this part, you can:
var geocoder = require('mapquest-api').geocoder;
Pass a location in, as either a string, or a more structured, object via the options object. Passall: true in the options object to receive an array of all the locations retrieved.
// String Search
geocoder.geocode({location: '1 Infinite Loop, Cupertino, CA'}, function(err, location) {
console.log(location);
});
// Object Search
geocoder.geocode({location: {street: "1 Infinite Loop", city: "Cupertino", postalCode: "95014"}}, function(err, location) {
console.log(location);
});