Geocoding in node.js with node-geocoder

After more than a year of developing node-geocoder library, I finally take the time to write a small article to present you this library.

Node geocoder is a node.js module which provides an abstraction layer for geocoding and reverse geocoding.

Usage

To install the module it's really easy : just run the following command to get the latest version:

npm install node-geocoder  

Then you can geocode your first address :

// Require the module
var NodeGeocoder = require('node-geocoder');  
// Choose a geocoder provider
var geocoder = NodeGeocoder.get('google');

// Geocode
geocoder.geocode('Your adress')  
    .then(function(result) {
        console.log(result);
    });

Future of node-geocoder

  • More provider: Currently this library supports 11 geocoding providers. In a near future new providers will appear.
  • Better error handling: I am currently refactoring error handling to be more debugable.
  • A logo ?

More

Node-geocoder documentation http://nchaulet.github.io/node-geocoder/

Github: https://github.com/nchaulet/node-geocoder