geocode

a geocoder with cache

Usage no npm install needed!

<script type="module">
  import geocode from 'https://cdn.skypack.dev/geocode';
</script>

README

geocoder

Node.js client for mapquest's Open Geocoding Service.
It supports caching of results in CouchDB.

Examples

var geocode = require('../lib/index')()

var places = ['New York', 'Heidelberg', 'Tokio', 'Cape Town']
geocode(places, function(err, res) {
  // outputs geocoded result
})

To enable caching of results in CouchDB:

var cacheConfig = {host: 'http://127.0.0.1', port: 5984, db: 'geocode_test', init: true}
var geocode = require('../lib/index')({cache: cacheConfig})

geocode(places, function(err, res) { ... })