TileStache.Config | index |
The configuration bits of TileStache.
TileStache configuration is stored in JSON files, and is composed of two main
top-level sections: "cache" and "layers". There are examples of both in this
minimal sample configuration:
{
"cache": {"name": "Test"},
"layers": {
"ex": {
"provider": {"name": "mapnik", "mapfile": "style.xml"},
"projection": "spherical mercator"
}
}
}
The contents of the "cache" section are described in greater detail in the
TileStache.Caches module documentation. Here is a different sample:
"cache": {
"name": "Disk",
"path": "/tmp/stache",
"umask": "0000"
}
The "layers" section is a dictionary of layer names which are specified in the
URL of an individual tile. More detail on the configuration of individual layers
can be found in the TileStache.Core module documentation. Another sample:
{
"cache": ...,
"layers":
{
"example-name":
{
"provider": { ... },
"metatile": { ... },
"preview": { ... },
"stale lock timeout": ...,
"projection": ...
}
}
}
In-depth explanations of the layer components can be found in the module
documentation for TileStache.Providers, TileStache.Core, and TileStache.Geography.
Modules | ||||||
|
Classes | ||||||||||
|
Functions | ||
|
Data | ||
modules = {'ConfigParser': <module 'ConfigParser' from '/usr/lib/python2.6/ConfigParser.pyc'>, 'FixTk': <module 'FixTk' from '/usr/lib/python2.6/lib-tk/FixTk.pyc'>, 'ModestMaps': <module 'ModestMaps' from '/usr/local/lib/python...estMaps-1.1.0-py2.6.egg/ModestMaps/__init__.pyc'>, 'ModestMaps.BlueMarble': <module 'ModestMaps.BlueMarble' from '/usr/local...tMaps-1.1.0-py2.6.egg/ModestMaps/BlueMarble.pyc'>, 'ModestMaps.CloudMade': <module 'ModestMaps.CloudMade' from '/usr/local/...stMaps-1.1.0-py2.6.egg/ModestMaps/CloudMade.pyc'>, 'ModestMaps.Core': <module 'ModestMaps.Core' from '/usr/local/lib/p.../ModestMaps-1.1.0-py2.6.egg/ModestMaps/Core.pyc'>, 'ModestMaps.Geo': <module 'ModestMaps.Geo' from '/usr/local/lib/py...s/ModestMaps-1.1.0-py2.6.egg/ModestMaps/Geo.pyc'>, 'ModestMaps.Microsoft': <module 'ModestMaps.Microsoft' from '/usr/local/...stMaps-1.1.0-py2.6.egg/ModestMaps/Microsoft.pyc'>, 'ModestMaps.OpenStreetMap': <module 'ModestMaps.OpenStreetMap' from '/usr/lo...ps-1.1.0-py2.6.egg/ModestMaps/OpenStreetMap.pyc'>, 'ModestMaps.PIL': None, ...} stderr = <open file '<stderr>', mode 'w'> |