From 498851352ab309a1cb8866d673abb9d30b6ffcea Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Wed, 2 Jul 2014 14:57:14 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B5=20?= =?UTF-8?q?=D1=81=D0=BF=D0=B8=D1=81=D0=BA=D0=B0=20=D1=82=D0=BE=D1=87=D0=B5?= =?UTF-8?q?=D0=BA=20=D0=BF=D1=80=D0=B8=20=D0=BF=D0=BE=D0=B4=D0=B3=D1=80?= =?UTF-8?q?=D1=83=D0=B7=D0=BA=D0=B5=20=D1=80=D0=BE=D1=83=D1=82=D0=B0=20?= =?UTF-8?q?=D0=B8=D0=B7=20=D1=83=D1=80=D0=BB=D0=B0=20=D0=B8=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D0=BF=D1=80=D0=BE=D0=BA=D0=BB=D1=8B=D0=B4=D1=8B=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B8=20=D0=BC=D0=B0=D1=80=D1=88=D1=80=D1=83?= =?UTF-8?q?=D1=82=D0=B0=20=D0=BF=D0=BE=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA?= =?UTF-8?q?=D0=B5=20'=D0=BF=D1=80=D0=BE=D0=BB=D0=BE=D0=B6=D0=B8=D1=82?= =?UTF-8?q?=D1=8C'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/views/indexTemplate.php | 2 +- public/js/map.js | 2 +- public/js/route.js | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) 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(); }