given an array of objects and a transform into a geocodable string, geocode them if possible
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.editorconfig
.gitignore
CHANGELOG.md
LICENSE
README.md
data.js
index.html
index.js
package.json

README.md

geocodemany

Given an array of objects and a transform into a geocodable string, geocode them if possible. Works in both node and the browser.

example

var data = [{
    city: 'Chester',
    state: 'New Jersey'
}, {
    city: 'Washington',
    state: 'DC'
}];

function transform(obj) {
    return obj.city + ', ' + obj.state;
}

function progress() {
    console.log(arguments);
}

function done() {
    console.log(arguments);
}

var geocoder = geocodemany('ACCESSTOKEN');

geocoder(data, transform, progress, done);