diff --git a/ground/views/indexTemplate.php b/ground/views/indexTemplate.php index 20ee5b7..3f370a9 100644 --- a/ground/views/indexTemplate.php +++ b/ground/views/indexTemplate.php @@ -51,7 +51,7 @@

Маршрут

- + diff --git a/public/js/map.js b/public/js/map.js index ac69601..e9ae67b 100644 --- a/public/js/map.js +++ b/public/js/map.js @@ -139,7 +139,7 @@ function initPoints() } else if (getURLParameter('route') != 'null') { loadRouteJSON(getURLParameter('route')); - buildRoute(); + buildRoute(true); } else if ((getURLParameter('lat') != 'null') && (getURLParameter('lng') != 'null') && (getURLParameter('zoom') != 'null')) { myMap.setView([getURLParameter('lat'), getURLParameter('lng')], getURLParameter('zoom')); diff --git a/public/js/route.js b/public/js/route.js index 13a6a4e..23dd2e1 100644 --- a/public/js/route.js +++ b/public/js/route.js @@ -6,7 +6,7 @@ * Строит маршрут по выбранным точкам. * @returns {undefined} */ -function buildRoute() +function buildRoute(fit) { wayPoints = Array(); if (route) @@ -51,7 +51,11 @@ function buildRoute() } }); - myMap.fitBounds(bounds).zoomOut(); + if (fit === true) + { + closeBox(); + myMap.fitBounds(bounds).zoomOut(); + } routeToURL(); }