Neighbourhood Party Manager

    combine-tiles

    2.0.0 • Public • Published

    combine-tiles

    Combine map tiles into a single large image. Uses the great sharp package for efficiency. Similar to abacus and merge-tiles.

    npm version build status ISC-licensed support me via GitHub Sponsors chat with me on Twitter

    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'
    
    combineTiles(tiles, size, size, dest)
    .catch(console.error)

    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.

    Install

    npm i combine-tiles

    DownloadsWeekly Downloads

    3

    Version

    2.0.0

    License

    ISC

    Unpacked Size

    69.3 kB

    Total Files

    10

    Last publish

    Collaborators

    • derhuerst