node.js geocoder with pluggable geocoding services.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
adapters
test
.gitignore
.jshintrc
README.md
index.js
package.json

README.md

omnigeo

omnigeo is a node.js library for geocoding addresses with pluggable services. There are no production dependencies outside of node.js itself. The current state of this library is very alpha. You have been warned.

Usage

Defaults to google:

var omnigeo = require('omnigeo')

omnigeo().geocode('New York, NY', function(res) {
  console.log(res)
  // { lat: 40.71, lng: -74.00 }
}

Defining a service:

omnigeo({service: 'mapquest'}).geocode('New York, NY', function(res) {
  console.log(res)
  // { lat: 40.71, lng: -74.00 }
}

Services

  • Bing
  • DataScienceToolkit
  • Geocoder.ca
  • Google Maps
  • Mapquest Open
  • Nominatim (OpenStreetMaps geocoder)
  • Yandex

Adding a service

Additional service adapters can be added to the services object on the constructor:

var adapter = require('./my_adapter')
omnigeo.services['my api'] = adapter

omnigeo({service: 'my api'}).geocode('New York, NY', function(res) {
  ...
})

All adapters must be constructors that implement the buildUrl and parseResponse methods on their prototype.

Contributing

If you have an interest in working on something or fixing a bug, file an issue.

License

BSD