diff options
Diffstat (limited to 'chimere/settings.sample.py')
| -rw-r--r-- | chimere/settings.sample.py | 56 |
1 files changed, 47 insertions, 9 deletions
diff --git a/chimere/settings.sample.py b/chimere/settings.sample.py index bf7c484..22502b2 100644 --- a/chimere/settings.sample.py +++ b/chimere/settings.sample.py @@ -1,7 +1,8 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# This file is an example of settings.py for a Chimère project +# Don't edit this file: +# overload all theses settings in your local_settings.py file import os _ = lambda s: s @@ -24,8 +25,6 @@ JQUERY_JS_URLS = ('/javascript/jquery/jquery.js', JQUERY_CSS_URLS = ('/javascript/jquery-ui/css/smoothness/jquery-ui.css', '/javascript/jquery-ui-themes/base/jquery.ui.all.css') -OSM_CSS_URLS = ["http://www.openlayers.org/api/theme/default/style.css"] - GPSBABEL = '/usr/bin/gpsbabel' GPSBABEL_OPTIONS = 'simplify,crosstrack,error=0.005k' # simplify with an # error of 5 meters @@ -77,6 +76,8 @@ CHIMERE_SHAPEFILE_ENCODING = 'ISO-8859-1' # it could be a good idea to hide it to an admin who could'nt do that CHIMERE_HIDE_PROPERTYMODEL = False +CHIMERE_ENABLE_CLUSTERING = False + # enable routing in Chimère CHIMERE_ENABLE_ROUTING = False @@ -218,6 +219,9 @@ INSTALLED_APPS += [ LOG_PATH = '/var/log/django/' +CHIMERE_VIEW_RENDERER = 'openlayers' # 'openlayers' or 'leaflet' +CHIMERE_EDIT_RENDERER = 'openlayers' # 'openlayers' + try: from local_settings import * except ImportError, e: @@ -281,9 +285,43 @@ if 'CHIMERE_SHARE_NETWORKS' not in globals(): STATIC_URL + 'chimere/img/identica.png'), ) -if 'OSM_JS_URLS' not in globals(): - global OSM_JS_URLS - OSM_JS_URLS = [STATIC_URL + "openlayers/OpenLayers.js", - STATIC_URL + "openlayers/SimplePanZoom.js", - "http://www.openstreetmap.org/openlayers/OpenStreetMap.js"] - +if 'MAP_JS_URLS' not in globals(): + global MAP_JS_URLS + MAP_JS_URLS = { + 'openlayers':[ + STATIC_URL + "openlayers/OpenLayers.js", + STATIC_URL + "openlayers/SimplePanZoom.js", + "http://www.openstreetmap.org/openlayers/OpenStreetMap.js", + STATIC_URL + "chimere/js/jquery.chimere-ol.js" + ], + 'leaflet':[ + STATIC_URL + "leaflet/leaflet.js", + STATIC_URL + "chimere/js/jquery.chimere-leaflet.js" + ] + } + if CHIMERE_ENABLE_CLUSTERING: + MAP_JS_URLS['leaflet'] += [ + STATIC_URL + "leaflet-markercluster/leaflet.markercluster.js" + ] +if 'MAP_CSS_URLS' not in globals(): + global MAP_CSS_URLS + MAP_CSS_URLS = { + 'openlayers':["http://www.openlayers.org/api/theme/default/style.css"], + 'leaflet':[STATIC_URL + "leaflet/leaflet.css", + STATIC_URL + "leaflet-markercluster/MarkerCluster.css", + STATIC_URL + "leaflet-markercluster/MarkerCluster.Default.css", + ] + } + # key: [(url, condition)] + MAP_CONDITIONNAL_CSS_URLS = { + 'openlayers':[("http://www.openlayers.org/api/theme/default/style.css", + None)], + 'leaflet':[ + (STATIC_URL + "leaflet/leaflet.css", None), + (STATIC_URL + "leaflet/leaflet.ie.css", 'lte IE 8') + (STATIC_URL + "leaflet-markercluster/MarkerCluster.css", None), + (STATIC_URL + "leaflet-markercluster/MarkerCluster.Default.css", None), + (STATIC_URL + "leaflet-markercluster/MarkerCluster.Default.ie.css", + 'lte IE 8'), + ] + } |
