Merge remote-tracking branch 'upstream/pull/2548'
This commit is contained in:
commit
e89742928d
1 changed files with 6 additions and 6 deletions
|
@ -141,15 +141,15 @@ OSM.Directions = function (map) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$(".directions_form .reverse_directions").on("click", function () {
|
$(".directions_form .reverse_directions").on("click", function () {
|
||||||
var from = endpoints[0].latlng,
|
var coordFrom = endpoints[0].latlng,
|
||||||
to = endpoints[1].latlng,
|
coordTo = endpoints[1].latlng,
|
||||||
routeFrom = "",
|
routeFrom = "",
|
||||||
routeTo = "";
|
routeTo = "";
|
||||||
if (from) {
|
if (coordFrom) {
|
||||||
routeFrom = from.lat + "," + from.lng;
|
routeFrom = coordFrom.lat + "," + coordFrom.lng;
|
||||||
}
|
}
|
||||||
if (to) {
|
if (coordTo) {
|
||||||
routeTo = to.lat + "," + to.lng;
|
routeTo = coordTo.lat + "," + coordTo.lng;
|
||||||
}
|
}
|
||||||
|
|
||||||
OSM.router.route("/directions?" + querystring.stringify({
|
OSM.router.route("/directions?" + querystring.stringify({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue