Utilities for MBTiles tilesets.
Add this line to your application's Gemfile:
gem 'mbtiles'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mbtiles
require "mbtiles"
tileset = MBTiles::Tileset.new("path_to_tileset.mbtiles")
# Access metadata as a Hash
tileset.metadata[:version]
# or using a shorthand syntax
tileset.version
# Enumerate through tiles
tileset.tiles.each do |tile|
# Do something with tile
end
# or access a specific tile (e.g. for rendering)
tileset.tile_at(x, y, z)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request