Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

geocoder-geonames

A promises based node.js wrapper for the Geonames.org API.

Installation

Installing using npm:

npm i geocoder-geonames

Usage

Initialization

var GeocoderGeonames = require('geocoder-geonames'),
    geocoder = new GeocoderGeonames({
      username:      'Your Geonames.org username',
    });

The constructor function also takes an optional configuration object:

  • premium: true || false
  • endpoint: specify

Search

  geocoder.get('search',{
    q: 'Berlin'
  })
  .then(function(response){
    console.log(response);
  })
  .catch(function(error){
    console.log(error);
  });

Optional parameters:

Response

All methods return a promise.

About

Promises based node.js wrapper for the geonames.org geocoder.

Resources

Releases

No releases published
You can’t perform that action at this time.