FIX точки маршрута в урле
This commit is contained in:
parent
498851352a
commit
12fe59d0fd
|
|
@ -30,6 +30,11 @@ function buildRoute(fit)
|
||||||
wayPoints.push({latLng: points[$(el).attr('pointId')]._latlng});
|
wayPoints.push({latLng: points[$(el).attr('pointId')]._latlng});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (fit === true)
|
||||||
|
{
|
||||||
|
myMap.fitBounds(bounds).zoomOut();
|
||||||
|
}
|
||||||
|
|
||||||
if (wayPoints.length > 1)
|
if (wayPoints.length > 1)
|
||||||
{
|
{
|
||||||
L.Routing.osrm().route(wayPoints, function(err, routes) {
|
L.Routing.osrm().route(wayPoints, function(err, routes) {
|
||||||
|
|
@ -50,16 +55,10 @@ function buildRoute(fit)
|
||||||
route.addTo(myMap);
|
route.addTo(myMap);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (fit === true)
|
|
||||||
{
|
|
||||||
closeBox();
|
|
||||||
myMap.fitBounds(bounds).zoomOut();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
routeToURL();
|
routeToURL();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Сохраняет маршрут на сервере.
|
* Сохраняет маршрут на сервере.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue