Skip to content

mapbox/geocode-many

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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);

About

given an array of objects and a transform into a geocodable string, geocode them if possible

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published