fix geodesic circle - formula had errors!
https://plus.google.com/108582664457219405296/posts/CoNTvk5i4xF
This commit is contained in:
parent
60e6552ca2
commit
5b81fa4086
5
external/L.Geodesic.js
vendored
5
external/L.Geodesic.js
vendored
@ -174,10 +174,9 @@ Modified by qnstie 2013-07-17 to maintain compatibility with Leaflet.draw
|
||||
|
||||
var calcLatLngAtAngle = function(angle) {
|
||||
var lat = Math.asin(sinCentreLat*cosRadRadius + cosCentreLat*sinRadRadius*Math.cos(angle));
|
||||
var lng = centreLng + Math.atan2(Math.sin(angle)*sinRadRadius*cosCentreLat, cosRadRadius-sinCentreLat*Math.sin(lat));
|
||||
|
||||
var lon = centreLng + Math.asin( Math.sin(angle) * sinRadRadius / cosCentreLat )
|
||||
|
||||
return L.latLng(lat * r2d,lon * r2d);
|
||||
return L.latLng(lat * r2d,lng * r2d);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user