Skip to content

Commit 9778a23

Browse files
committed
Merge pull request graphhopper#648 from fbonzon/patch-1
Wrap coordinates around dateline
2 parents 7559f6e + e0ec282 commit 9778a23

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

web/src/main/webapp/js/main-template.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,14 @@ function setToEnd(e) {
325325
}
326326

327327
function setStartCoord(e) {
328-
ghRequest.route.set(e.latlng, 0);
328+
ghRequest.route.set(e.latlng.wrap(), 0);
329329
resolveFrom();
330330
routeIfAllResolved();
331331
}
332332

333333
function setIntermediateCoord(e) {
334334
var index = ghRequest.route.size() - 1;
335-
ghRequest.route.add(e.latlng, index);
335+
ghRequest.route.add(e.latlng.wrap(), index);
336336
resolveIndex(index);
337337
routeIfAllResolved();
338338
}
@@ -346,7 +346,7 @@ function deleteCoord(e) {
346346

347347
function setEndCoord(e) {
348348
var index = ghRequest.route.size() - 1;
349-
ghRequest.route.set(e.latlng, index);
349+
ghRequest.route.set(e.latlng.wrap(), index);
350350
resolveTo();
351351
routeIfAllResolved();
352352
}

0 commit comments

Comments
 (0)