work-around for mobile-specific geodesic line drawing issue - appears to be an odd rounding problem
not ideal, but better than the current situation
This commit is contained in:
parent
11cfa11406
commit
78e9983d90
4
external/L.Geodesic.js
vendored
4
external/L.Geodesic.js
vendored
@ -58,6 +58,9 @@ Modified by qnstie 2013-07-17 to maintain compatibility with Leaflet.draw
|
||||
// loop ends before 'segments' is reached - we don't add the very last point here but outside the loop
|
||||
// (this was to fix a bug - https://github.com/jonatkins/ingress-intel-total-conversion/issues/471
|
||||
// rounding errors? maths bug? not sure - but it solves the issue! and is a slight optimisation)
|
||||
// UPDATE: there still seem to be rounding errors on relatively short links - but only on mobile.
|
||||
// let's only add intermediate points if there's two or more
|
||||
if (segments >= 3) {
|
||||
for (i = 1; i < segments; i++) {
|
||||
// http://williams.best.vwh.net/avform.htm#Intermediate
|
||||
// modified to handle longitude above +-180 degrees
|
||||
@ -72,6 +75,7 @@ Modified by qnstie 2013-07-17 to maintain compatibility with Leaflet.draw
|
||||
|
||||
convertedPoints.push(L.latLng([fLat, fLng]));
|
||||
}
|
||||
}
|
||||
// push the final point unmodified
|
||||
convertedPoints.push(L.latLng(endLatlng));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user