Changeset 9189
- Timestamp:
- May 12, 2011, 1:55:27 PM (14 years ago)
- Location:
- src/django_gheat
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/settings.py
r9188 r9189 2 2 3 3 import os 4 PROJECT_HOME = os.path.dirname(__file__) 4 PROJECT_HOME = os.path.abspath(os.path.dirname(__file__)) 5 OSM_CACHE_DIR = '/tmp/osm-cache' 6 OSM_CACHE = 'osm_cache' 7 8 5 9 6 10 DEBUG = True 7 11 TEMPLATE_DEBUG = DEBUG 12 13 if DEBUG and not os.path.exists(OSM_CACHE_DIR): 14 os.mkdir(OSM_CACHE_DIR) 8 15 9 16 # Required for Etags Caching Implementation … … 31 38 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 32 39 'LOCATION': 'unique-snowflake' 40 }, 41 OSM_CACHE: { 42 'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', 43 'LOCATION': OSM_CACHE_DIR, 44 'TIMEOUT': 3600 * 24 * 7, 45 'OPTIONS': { 46 'MAX_ENTRIES': 100000 47 } 33 48 } 34 49 } -
src/django_gheat/website/static/OpenStreetMap.js
r9166 r9189 45 45 initialize: function(name, options) { 46 46 var url = [ 47 "http://a.tile.openstreetmap.org/${z}/${x}/${y}.png", 48 "http://b.tile.openstreetmap.org/${z}/${x}/${y}.png", 49 "http://c.tile.openstreetmap.org/${z}/${x}/${y}.png" 47 "/website/osm-proxy/${z}/${x},${y}.png", 50 48 ]; 51 49 options = OpenLayers.Util.extend({ numZoomLevels: 19 }, options); -
src/django_gheat/website/urls.py
r9186 r9189 20 20 ) 21 21 22 urlpatterns += patterns('website.osm_proxy', 23 url( 24 # Example : today/fire/12/3,2.png 25 regex = r'^osm-proxy/(?P<zoom>\d+)/(?P<x>\d+),(?P<y>\d+).png$', 26 view = 'osm_proxy', 27 name = 'osm_proxy', 28 ), 29 ) 30 22 31 urlpatterns += patterns('website.nodelist', 23 32 url(
Note:
See TracChangeset
for help on using the changeset viewer.