Skip to content

bobbywilson0/omnigeo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

node.js geocoder with pluggable geocoding services.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published