1.0.1 • Published 8 years ago

raster-tile-style v1.0.1

Weekly downloads
9
License
MIT
Repository
github
Last release
8 years ago

raster-tile-style

Helper function for creating MapboxGL styles for serving raster tiles.

Installation

npm install raster-tile-style

Usage

var rasterTileStyle = require('raster-tile-style');
var style = rasterTileStyle(['https://example.com/{z}/{x}/{y}.png']);

The default tile size is 256 but you can override it using the second parameter.

var style = rasterTileStyle(['https://example.com/{z}/{x}/{y}.png'], 512);

See also

  1. MapboxGL-js style spec
  2. react-map-gl