sharedstreets-api
v0.3.0
Published
SharedStreets API
Downloads
25
Readme
SharedStreets API
Interact directly with SharedStreet's API.
Install
In Node.js
$ yarn add sharedstreets-api
CommonJS
const sharedstreetsApi = require('sharedstreets-api');
Typescript
import * as sharedstreetsApi from 'sharedstreets-api';
In Browser
For a full list of web examples, check out SharedStreets examples.
CLI
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"
API
Table of Contents
downloadTile
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
})