summaryrefslogtreecommitdiff
path: root/chimere/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-05-15 19:09:17 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-05-15 19:09:17 +0200
commit34930e7262e9aa5d826b371a7b4730a1da2030f9 (patch)
treebbf728fe2b49409c37e45caafefda2bffcec5f5b /chimere/templates
parenta3a33b79b3cd43535a491c8d9762ebde5b5da9b5 (diff)
downloadChimère-34930e7262e9aa5d826b371a7b4730a1da2030f9.tar.bz2
Chimère-34930e7262e9aa5d826b371a7b4730a1da2030f9.zip
Zoom to the current area on edition
Diffstat (limited to 'chimere/templates')
-rw-r--r--chimere/templates/chimere/blocks/live_coordinates.html1
-rw-r--r--chimere/templates/chimere/blocks/polygon_edit.html1
2 files changed, 2 insertions, 0 deletions
diff --git a/chimere/templates/chimere/blocks/live_coordinates.html b/chimere/templates/chimere/blocks/live_coordinates.html
index 7e8cfd9..17e0676 100644
--- a/chimere/templates/chimere/blocks/live_coordinates.html
+++ b/chimere/templates/chimere/blocks/live_coordinates.html
@@ -44,6 +44,7 @@
{% else %}
$('#map_edit').chimere('activateDraw');
{% endif %}
+ $('#map_edit').chimere('zoom', { 'area':%s });
function update_marker_on_map(){
var mylonlat = [$('#live_longitude').val(),
diff --git a/chimere/templates/chimere/blocks/polygon_edit.html b/chimere/templates/chimere/blocks/polygon_edit.html
index be112d2..f8c7d06 100644
--- a/chimere/templates/chimere/blocks/polygon_edit.html
+++ b/chimere/templates/chimere/blocks/polygon_edit.html
@@ -26,6 +26,7 @@
function init_map_edit(){% raw %}{{{% endraw %}
$('#map_edit').chimere(chimere_init_options);
$('#map_edit').chimere('activateDraw');
+ $('#map_edit').chimere('zoom', {% raw %} {{ 'area':{zoom} }} {% endraw %});
{% if value %}$('#map_edit').chimere('initFeature', '{{value}}');
{% endif %}
{% raw %}}}{% endraw %}