unbounded unproject

This commit is contained in:
mourner 2010-09-10 18:11:56 +03:00
parent 7cef8d3851
commit 63febdd6c1

View File

@ -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);
}
};