diff options
Diffstat (limited to 'static/edit_route_map.js')
| -rw-r--r-- | static/edit_route_map.js | 3 |
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) { |
