unbounded unproject
This commit is contained in:
parent
7cef8d3851
commit
63febdd6c1
@ -22,11 +22,11 @@ L.Projection.Mercator = {
|
||||
return new L.Point(x, y);
|
||||
},
|
||||
|
||||
unproject: function(/*Point*/ point) /*-> LatLng*/ {
|
||||
unproject: function(/*Point*/ point, /*Boolean*/ unbounded) /*-> LatLng*/ {
|
||||
var d = L.LatLng.DEG_TO_RAD,
|
||||
lng = point.x / d,
|
||||
lat = (2 * Math.atan(Math.exp(point.y)) - Math.PI/2) / d;
|
||||
|
||||
return new L.LatLng(lat, lng);
|
||||
return new L.LatLng(lat, lng, unbounded);
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user