0.1.0 • Published 6 years ago

@mapquest/search v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

MQ Search

A JavaScript interface to the MapQuest Search API. You must obtain a client ID before using this service. This module can be used in the browser and server side. The results are returned as a GeoJSON FeatureCollection.

const Search = require('@mapquest/search');
const search = new Search({key: 'xxxxx'})

search.radius({lat: 39.75, lng: -104.99}, {radius: 10}) //radius in miles
  .then(results => {
    console.log(results);
   })

search.corridor(routeSessionId, {})  //route Session ID from the Directions API followed by options
  .then(results => {
    console.log(results);
   })