Ruby gem to convert large images into tiles to use with js mapping libraries
Switch branches/tags
Nothing to show
Clone or download
Latest commit 5002151 Oct 15, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Add interrupt handler to tileup bin Aug 3, 2013
lib Bump version number Oct 15, 2015
LICENCE.txt Add licence.txt Aug 3, 2013 updated readme contrib instructions Apr 16, 2013
tileup.gemspec Update rmagick and bundler dependency versions Oct 15, 2015

Tile Up

Tile Up is a ruby Ruby gem that splits a large image into a set of tiles to use with javascript mapping libraries such as Leaflet.js or Modest Maps. You can also use Tile Up to make tiles for CATiledLayer (or anything else really...).


gem install tileup

tileup requires rmagick for image manipulation, which depends on imagemagick. imagemagick is avaliable through homebrew.



To generate some tiles from a large image, you'll probably use something like:

tileup --in huge_image.png --output-dir image_tiles \
        --prefix my_tiles --verbose

Which will split huge_image.png up into 256x256 (default) sized tiles, and save them into the directory image_tiles. The images will be saved as my_tiles_[COLUMN]_[ROW].png


Auto zooming

tileup can also scale your image for a number of zoom levels (max 20 levels). This is done by scaling down the original image, so make sure its pretty big.

(Auto zooming is an experimental hack, it should work fine for smaller increments, but may be unreliable at higher levels. E.g. --auto-zoom 4 should work fine, --auto-zoom 20 might not work so well.)

tileup --in really_huge_image.png --auto-zoom 4 \
       --output-dir map_tiles

--auto-zoom 4 means, make 4 levesl of zoom, starting from really_huge_image.png at zoom level 20, then scale that down for 19, etc.

You should see something like:


(where 20 is zoom level 20, the largest zoom, 19 is half the size of 20, 18 is half the size of 19, …)

Getting help

You can get help by running tileup -h.


Fixes and patches welcome, to contribute:

  1. Fork this project
  2. Create a feature or fix branch off the develop branch
  3. Submit a pull request on that branch