FIX точки маршрута в урле

This commit is contained in:
Krivchikov Dmitry 2014-07-02 15:28:18 +04:00
parent 498851352a
commit 12fe59d0fd
1 changed files with 7 additions and 8 deletions

View File

@ -30,6 +30,11 @@ function buildRoute(fit)
wayPoints.push({latLng: points[$(el).attr('pointId')]._latlng});
});
if (fit === true)
{
myMap.fitBounds(bounds).zoomOut();
}
if (wayPoints.length > 1)
{
L.Routing.osrm().route(wayPoints, function(err, routes) {
@ -50,15 +55,9 @@ function buildRoute(fit)
route.addTo(myMap);
}
});
if (fit === true)
{
closeBox();
myMap.fitBounds(bounds).zoomOut();
}
routeToURL();
}
routeToURL();
}
/**