Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Node.js - Mapbox Batch Geocoder

mapbox_batch.js reads queries from an input text file, one per line, and constructs parallelized batch queries.

Results are stored in an output directory as JSON files.

Requirements

Installation

npm install

Usage

Command line:

MapboxAccessToken=YOUR_ACCESS_TOKEN node mapbox-batch.js input_file.txt /path/to/output/directory

Programmatic:

var fs = require('fs'),
    mapbox = require('./mapbox-batch.js');

var geocoder = mapbox('YOUR_ACCESS_TOKEN');
geocoder.on('data', function(data) {
    console.log(data);
});
fs.createReadStream('/path/to/source/data.txt').pipe(geocoder);