diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-03-16 16:47:05 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-03-16 16:47:05 +0100 |
commit | 07da39e35e02ce0e9142289504bfdbb44d1c4365 (patch) | |
tree | 07cea03953979d27fdfd0ad5343fbcda024a6c21 | |
parent | 8f34033d833f009c042ac6466de6d723b865beff (diff) | |
parent | 1e26b4bce6b2a92e0fd3eb8a3a5dd1699d5f3ca9 (diff) | |
download | Chimère - projet Saclay-07da39e35e02ce0e9142289504bfdbb44d1c4365.tar.bz2 Chimère - projet Saclay-07da39e35e02ce0e9142289504bfdbb44d1c4365.zip |
Merge branch 'master-v3.0' into saclay-v3.0
-rw-r--r-- | templates/chimere/blocks/map.html | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/templates/chimere/blocks/map.html b/templates/chimere/blocks/map.html index 26bc9bd..b93fea8 100644 --- a/templates/chimere/blocks/map.html +++ b/templates/chimere/blocks/map.html @@ -35,7 +35,6 @@ $("#{{map_id}}").show(); "explicit_popup_hide": true, "map_layers": [{{js_map_layers|safe|escape}}], 'routing': {{routing}}, - {% if dynamic_categories %}'dynamic_categories': true,{% endif %} {% if default_area %}"default_area": new Array({{default_area.upper_left_corner.x}}, {{default_area.upper_left_corner.y}}, {{default_area.lower_right_corner.x}}, {{default_area.lower_right_corner.y}}),{% endif %} {% if p_zoom %}"zoom": {{ p_zoom }},{% endif %} {% if p_lat %}"lat": {{ p_lat }},{% endif %} @@ -49,7 +48,6 @@ $("#{{map_id}}").show(); {% if p_routing_speed %}"routing_speed": "{{ p_routing_speed }}",{% endif %} "dynamic_categories": {{ dynamic_categories }}, {% if p_display_submited %}"display_submited": {{ p_display_submited }},{% endif %} - "checked_categories": [{% for cc in checked_categories %}{% if forloop.counter0 > 0 %}, {% endif %}{{cc}}{% endfor %}], {% if area_id %}'area_id': "{{area_id}}",{% endif %} {% if p_current_feature %}"display_feature": {{ p_current_feature }},{% endif %} {% if selected_map_layer %}"selected_map_layer": {{selected_map_layer}},{% endif %} @@ -60,6 +58,13 @@ $("#{{map_id}}").show(); {% if restricted_extent %}{{ restricted_extent }} chimere_init_options["restricted_extent"] = bounds; {% endif %} + {% if checked_categories %} + /* not a permalink */ + if (window.location.href.indexOf("#") <= -1) { + chimere_init_options["checked_categories"] = [ + {% for cc in checked_categories %}{% if forloop.counter0 > 0 %}, {% endif %}{{cc}}{% endfor %}]; + } + {% endif %} // Spécifique Saclay chimere_init_options["minZoom"] = 12; |