summaryrefslogtreecommitdiff
path: root/static/edit_route_map.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/edit_route_map.js')
-rw-r--r--static/edit_route_map.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/static/edit_route_map.js b/static/edit_route_map.js
index f1a466f..ee3f123 100644
--- a/static/edit_route_map.js
+++ b/static/edit_route_map.js
@@ -59,6 +59,9 @@ function initFeature(json_geometry){
currentFeature.geometry = linestring;
vectors.addFeatures([currentFeature]);
currentControl = pathModify;
+ /*zoom to the route*/
+ var bounds = vectors.getDataExtent();
+ if (bounds) map.zoomToExtent(bounds);
}
function updateForm(event) {