diff options
| 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 |
| commit | 34930e7262e9aa5d826b371a7b4730a1da2030f9 (patch) | |
| tree | bbf728fe2b49409c37e45caafefda2bffcec5f5b /chimere/templates | |
| parent | a3a33b79b3cd43535a491c8d9762ebde5b5da9b5 (diff) | |
| download | Chimè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.html | 1 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/polygon_edit.html | 1 |
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 %} |
