crystal_slippy_tiles
slippy_tiles
Crystal implementation of the Slippy Map Tilenames
https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
you can wrap this in a kemal project (or any other webservice / FaaS project) and use this for your tile based project 🔮 🚀
Installation
- 
Add the dependency to your
shard.yml:dependencies: slippy_tiles: github: simonneutert/slippy_tiles - 
Run
shards install 
Usage
require "slippy_tiles"
# latitude, longitude, zoom
tile = SlippyTiles.get_tile_number(50.0, 8.0, 14)
puts tile[:x] #=> 8556
puts tile[:y] #=> 5556
# tile_x, tile_y, zoom
geo = SlippyTiles.get_lat_lng_for_number(8556, 5556, 14) 
puts geo[:lat_deg].round #=> 50.0
puts geo[:lng_deg].round #=> 8.0
Contributing
- Fork it (https://github.com/simonneutert/slippy_tiles/fork)
 - 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 a new Pull Request
 
Contributors
- Simon Neutert - creator and maintainer
 
Repository
  crystal_slippy_tiles
Owner
  
  Statistic
  - 0
 - 0
 - 0
 - 0
 - 0
 - over 4 years ago
 - June 26, 2021
 
License
  MIT License
Links
  
  Synced at
  Mon, 03 Nov 2025 06:16:32 GMT
Languages