@mapquest/geocoding

0.0.4 • Public • Published

MQ Geocoding

A JavaScript interface to the MapQuest Geocoding API. You must obtain a key before using this service. This module can be used in the browser and server side.

Examples:

//setup the module
const Geocoding = require('@mapquest/geocoding');
const client = new Geocoding({key: 'xxxxxxx'})

//forward geocode
client.forward('1555 Blake St. Denver, CO 80204')
  .then(result => {
    console.log(result); // returns a GeoJson point of the first match
   })

//reverse geocode
client.reverse(39.75, -104.99)  //lat, lng
  .then(result => {
    console.log(result.addressString); //single line address, ie: "1555 Blake St., Denver, CO 80204"
    console.log(result.location); //geocoding service response
   })

Readme

Keywords

none

Package Sidebar

Install

npm i @mapquest/geocoding

Weekly Downloads

1

Version

0.0.4

License

MIT

Last publish

Collaborators

  • ignigena