geonoder

A NodeJS client for geocoding/reverse address lookup with plug-in services.

npm install geonoder
1 downloads in the last week
19 downloads in the last month

geonoder

A NodeJS client for geocoding/reverse address lookup with plug-in services.

Supported Providers

  • Google
  • Nominatim

Installation

To install this module in your project issue this command

npm install geonoder

Usage

Find the latitude and longitude of a given street address using Google as a provider.

var geonoder = require('geonoder')

var plebiscitoAddress = 'Via del Plebiscito, 102 00186 Roma'

geonoder.toCoordinates(plebiscitoAddress, geonoder.providers.google, function(lat, long) {
    console.log('Lat: ' + lat + ' Long: ' + long) // Lat: 41.8965209 Long: 12.4805225
})

Perform a reverse geocoding, find the street address associated with a given latitude and longitude pair.

var geonoder = require('geonoder')

var plebiscitoLat = 41.8965209
var plebiscitoLong = 12.4805225

geonoder.toAddress(plebiscitoLat, plebiscitoLong, geonoder.providers.google, function(address) {
    console.log('Address: ' + address) // 'Via del Plebiscito, 102 00186 Roma'
})

Tests

All tests are written using mocha. To install and run the tests:

npm install -g mocha
mocha -R list

Bug Reporting

To file a bug report, please use the project's issue tracker.

Roadmap

  • Add other free services
  • Add a caching mechanism

License

This project is released under the terms of the MIT license. You can find a copy of the license in the LICENSE file.

npm loves you