1.1.0 • Published 2 months ago

slippy-tile-generator v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 months ago

Slippy Tile Generator

A node.js slippy map tile generator.

Slippy takes a raster source image and creates map tiles for different zoom levels. Useful for generating custom tile layers for mapping libraries like Mapbox, Google Maps, and Leaflet.

Installation

To use slippy as a command anywhere in the CLI, you can install it globally:

npm i -g slippy-tile-generator

If you wish to use it in your project as a script, you can install it into your project locally:

npm i slippy-tile-generator --save-dev

Usage

slippy <source> <outputDir> --options

Options

ParameterDescriptionDefault
-min, --minZoomThe minimum zoom level.0
-max, --maxZoomThe maximum zoom level.0
-t, --tileSizeThe output tile size.256
-f, --formatThe output image format. Accepts jpg or png.jpg
-q, --qualityThe output image quality80
-h, --helpDisplay help for command.

Example

If you have the source image ./source.png and you wish to generate tiles for zoom levels 0 through to 4 and output them into the ./tiles directory you can run the command:

slippy ./source.png ./tiles -min 0 -max 4
1.1.0

2 months ago

1.0.0

4 months ago