Interact directly with SharedStreet's tile API.
In Node.js
$ yarn add sharedstreets-api
CommonJS
const sharedstreetsApi = require('sharedstreets-api');
Typescript
import * as sharedstreetsApi from 'sharedstreets-api';
For a full list of web examples, check out SharedStreets examples.
Usage:
$ sharedstreets-download-tile
Options:
--tile tile [x,y,zoom]
--layer layer (geometry|intersection|metadata|reference)
Examples:
$ sharedstreets-download-tile --tile [1186,1466,12] --layer "geometry" > "12-1186-1466.geometry.pbf"
Download Tile
Parameters
tile
Array<number> Tile [x, y, z]layer
string Layer (geometry|intersection|metadata|reference)options
Object Optional parameter (optional, default{}
)options.output
string Output (json|pbf) (optional, default"pbf"
)
Examples
const tile = [1186, 1466, 12];
const layer = "geometry";
sharedstreetsApi.downloadTile(tile, layer).then(data => {
data // => PBF Buffer
})