Python webservice for tiling static maps.
A demo can be found at https://tyler-demo.herokuapp.com - the Heroku project code is at https://github.com/benbacardi/tyler-heroku
Tyler is designed to be deployed in your own Django environment.
cacheback
and tyler
to your INSTALLED_APPS
setting.tyler.urls
to your urls.py
:urlpatterns = patterns('',
url(r'^', include('tyler.urls')),
)
TYLER_CACHE_DURATION
to cache . It defaults to one week.To use the service, call the URL with optional parameters to return the image in a .png
format:
GET /?lat=51.5008198&lon=-0.1427437&width=800&height=600
The available parameters are:
0
to 19
). Defaults to 17
.800
.600
.False
.http://[abc].tile.openstreetmap.org/{zoom}/{x}/{y}.png
. Requires the following parameters in the URL:
[abc]
. MapQuest uses [1234]
.To control the caching of the resultant image, set TYLER_CACHE_DURATION
in settings.py
to the number of seconds to cache for. This defaults to one week.
To control the caching of the individual tiles used to create the image, set TYLER_TILE_CACHE_DURATION
in settings.py
to the number of settings to cache for. This also defaults to one week.