Project

tairu

0.0
No commit activity in last 3 years
No release in over 3 years
Simple Tile Server for Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

>= 1.7.6
>= 2.0.1
>= 3.0.4
>= 3.48.0
>= 1.4.3
 Project Readme

Build Status

tairu ... simple map tile server

In development mode (irb): rake console

To run from bin: tairu --config /path/to/config/file

Example config file:

name: tairu_config_example
cache:
  type: memory
layers:
  geo:
    provider: mbtiles
    tileset: geography-class.mbtiles
    location: ~/.tairu/tilesets
    format: png

Configuration may be read from a yaml file (see example above) using Tairu.config_from_file(file_name) or by passing values for layers, cache, and name (optional) into a configuration block:

layers = {
  'geo' => {
    'provider' => 'mbtiles',
    'tileset' => 'geography-class.mbtiles',
    'location' => '~/.tairu/tilesets',
    'format' => 'png'
  }
}

cache = {
  'type' => 'redis',
  'options' => {
    'host' => 'localhost',
    'port' => '6379',
    'db' => 0
  }
}

Tairu.configure do |config|
  config.name = 'tairu_config_example'
  config.layers = layers
  config.cache = cache
end

NOTE: If no cache is passed in, it will default to the memory cache