diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-04-05 18:06:06 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-04-05 18:06:06 +0200 |
| commit | 2e9154a16b03c586450e15ec931996db3254f9fd (patch) | |
| tree | 361567173ec1f14b408c501e0d450fe69b8adb21 /chimere/settings.sample.py | |
| parent | 426eb4711ff92cc0e6df9cd1004ff322f112c814 (diff) | |
| download | Chimère-2e9154a16b03c586450e15ec931996db3254f9fd.tar.bz2 Chimère-2e9154a16b03c586450e15ec931996db3254f9fd.zip | |
Leaflet: work on clustering
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'), + ] |
