search-destination
General
Node.js module for geocoding and reverse geocoding.
Search geographic destination by name or address, by location or point of interest, by coordinates.
Installation
npm install search-destination [-S]
Used external modules as communicators for searching
- Module
search-google-geocode
. Used Google geocoding API - Module
search-geonames
. Used Geonames API - Module
search-osm-geocode
. Used Open Street Map (OSM) API
Usage example
// initialize searcher instancevar searcher = ; // request parametersconst ADDRESS = 'Paris';const LATITUDE = '48.833330';const LONGITUDE = '2.333330';const LANGUAGE = 'en'; // you can use Google options to manage result formatvar options = language: LANGUAGE // use callback to return result from geocoding process { if error console; // on error else console; // on success} /** * used google by default. * available: google, geonames, wiki (alias to geonames), osm (open street map) *///searcher.useProvider('wiki'); // show information about searcher instanceconsole; // search deatination by address, place. or poisearcher;// search deatination by geographical coordinatessearcher;