New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

mapquest-api

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapquest-api

Provides access to various MapQuest APIs

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Build Status mapquest-api

Provides access to the various Open MapQuest Web Services and APIs.

Installation via npm

$ npm install mapquest-api

API

To make use of the Open MapQuest APIs, you will need to an API key. Which can be obtained by signing up for an account at http://developer.mapquest.com.

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.

Usage

Get straight to work:

var mq = require('mapquest-api');

Geocoding Web Service | API Documentation

If you only want to use this part, you can:

var geocoder = require('mapquest-api').geocoder;

.geocode(options, callback)

Pass a location in, as either a string, or a more structured, object via the options object. Pass all: 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);
});

Keywords

mapping

FAQs

Package last updated on 28 Sep 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts