Perhaps you’ve had problems programmatically creating tiles with Tilemill, or are concerned about the future stability of project (or you just like playing with geo software).
brew install mapnik --with-gdal --with-postgresql
sudo pip install -U PIL modestmaps simplejson werkzeug
git clone https://github.com/TileStache/TileStache.git TileStache
cd TileStache
python setup.py install
/TileStache/your_project.xml
Modify /TileStache/tilestache.cfg
to be similar to this:
{
"cache":
{
"name": "Disk",
"path": "my_cache",
"umask": "0000",
"dirs": "portable"
},
"layers":
{
"your_layer": {
"provider" : {
"name": "mapnik", "mapfile": "your_project.xml"
}
}
}
}
Run the following:
./scripts/tilestache-server.py
Then open http://localhost:8080/your_project/preview.html
in a web browser. If you see your map, you are good to go!
Example: seed a cache from zoom levels 5-12 of the lower 48
sudo python ./scripts/tilestache-seed.py -b 24 -128 50 -66 -c tilestache.cfg -l your_project 5 6 7 8 9 10 11 12
tilestache-seed.py
also has methods for exports to other formats, such as mbtiles and S3. Check out the documentation for more info.