combine-tiles
v2.0.1
Published
Combine map tiles into a single large image.
Downloads
7
Maintainers
Readme
combine-tiles
Combine map tiles into a single large image. Uses the great sharp
package for efficiency. Similar to abacus and merge-tiles.
Installing
npm install combine-tiles
Usage
Check out the example
directory!
const combineTiles = require('combine-tiles')
const size = 300
const tiles = [
{x: 0, y: 0, file: '/path/to/0-0.png'},
{x: 1, y: 0, file: '/path/to/1-0.png'},
{x: 0, y: 1, file: '/path/to/0-1.png'},
{x: 1, y: 1, file: '/path/to/1-1.png'}
]
const dest = '/path/to/combined.png'
await combineTiles(tiles, size, size, dest)
You may want to use tilebelt to convert bounding boxes into [x, y, zoom]
tiles or tile-cover to generate a list of tiles in a bounding box.
Contributing
If you have a question or have difficulties using combine-tiles
, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.