geodesic: remove dependancy on L.LatLng.DEG_TO_RAD/RAD_TO_DEG, in preperation for leaflet 0.8
This commit is contained in:
parent
42ed6566e4
commit
a275ea1673
8
external/L.Geodesic.js
vendored
8
external/L.Geodesic.js
vendored
@ -41,8 +41,8 @@ Modified by qnstie 2013-07-17 to maintain compatibility with Leaflet.draw
|
||||
// points code that have been seen
|
||||
function geodesicConvertLine(startLatLng, endLatLng, convertedPoints) {
|
||||
var R = 6378137; // earth radius in meters (doesn't have to be exact)
|
||||
var d2r = L.LatLng.DEG_TO_RAD;
|
||||
var r2d = L.LatLng.RAD_TO_DEG;
|
||||
var d2r = Math.PI/180.0;
|
||||
var r2d = 180.0/Math.PI;
|
||||
|
||||
// maths based on http://williams.best.vwh.net/avform.htm#Int
|
||||
|
||||
@ -180,8 +180,8 @@ Modified by qnstie 2013-07-17 to maintain compatibility with Leaflet.draw
|
||||
|
||||
_calcPoints: function() {
|
||||
var R = 6378137; //earth radius in meters (approx - taken from leaflet source code)
|
||||
var d2r = L.LatLng.DEG_TO_RAD;
|
||||
var r2d = L.LatLng.RAD_TO_DEG;
|
||||
var d2r = Math.PI/180.0;
|
||||
var r2d = 180.0/Math.PI;
|
||||
//console.log("geodesicCircle: radius = "+this._mRadius+"m, centre "+this._latlng.lat+","+this._latlng.lng);
|
||||
|
||||
// circle radius as an angle from the centre of the earth
|
||||
|
Loading…
x
Reference in New Issue
Block a user