diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-08-12 19:01:13 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2014-08-12 19:01:13 +0200 |
commit | 14c3c542e6880fa652d58de6523e279feb189726 (patch) | |
tree | 0c9be1d9c127071abb051c72672d79230800cc3d | |
parent | 5c4d02160ddf89e187850bb27c42ef734cf574ec (diff) | |
download | Chimère - projet de référence-nef.tar.bz2 Chimère - projet de référence-nef.zip |
Adaptation on settingsnef
-rw-r--r-- | settings.py | 23 |
1 files 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'), + ] } - |