earth radius: change leaflet and leaflet-draw to use the radius value used by the s2 geometry library
this library is used in the ingress backend, so distance calculation, etc are far closer if we use the value from that
This commit is contained in:
2
external/leaflet.draw.js
vendored
2
external/leaflet.draw.js
vendored
@ -1602,7 +1602,7 @@ L.GeometryUtil = {
|
||||
area += ((p2.lng - p1.lng) * d2r) *
|
||||
(2 + Math.sin(p1.lat * d2r) + Math.sin(p2.lat * d2r));
|
||||
}
|
||||
area = area * 6378137.0 * 6378137.0 / 2.0;
|
||||
area = area * 6367000.0 * 6367000.0 / 2.0;
|
||||
}
|
||||
|
||||
return Math.abs(area);
|
||||
|
Reference in New Issue
Block a user