From 14c3c542e6880fa652d58de6523e279feb189726 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 12 Aug 2014 19:01:13 +0200 Subject: Adaptation on settings --- settings.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/settings.py b/settings.py index da703fb..0447558 100644 --- a/settings.py +++ b/settings.py @@ -76,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 @@ -297,20 +299,29 @@ if 'MAP_JS_URLS' not in globals(): 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"], + '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/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'), + ] } - -- cgit v1.2.3