diff options
Diffstat (limited to 'chimere/settings.sample.py')
| -rw-r--r-- | chimere/settings.sample.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/chimere/settings.sample.py b/chimere/settings.sample.py index da703fb..b23f31e 100644 --- a/chimere/settings.sample.py +++ b/chimere/settings.sample.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,13 +299,21 @@ 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"], } + if CHIMERE_ENABLE_CLUSTERING: + MAP_CSS_URLS['leaflet'] += [ + 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", @@ -313,4 +323,11 @@ if 'MAP_CSS_URLS' not in globals(): (STATIC_URL + "leaflet/leaflet.ie.css", 'lte IE 8') ] } + if CHIMERE_ENABLE_CLUSTERING: + MAP_CSS_URLS['leaflet'] += [ + (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'), + ] |
