예제 #1
0
        private LatLonZoom PixelToLatLong(Point64 p, int zoomLevel)
        {
            double num  = this.MetersPerPixel(zoomLevel);
            double num2 = (double)p.X * num - 20037508.342789244;
            double num3 = 20037508.342789244 - (double)p.Y * num;

            return(new LatLonZoom(CoordinateSystemUtilities.RadiansToDegrees(1.5707963267948966 - 2.0 * Math.Atan(Math.Exp(-num3 / 6378137.0))), CoordinateSystemUtilities.RadiansToDegrees(num2 / 6378137.0), zoomLevel));
        }
예제 #2
0
        internal static LatLon MercatorToLatLon(LatLon mercator)
        {
            double num  = 40075016.685578488;
            double num2 = mercator.lon * num - 20037508.342789244;
            double num3 = 20037508.342789244 - mercator.lat * num;

            return(new LatLon(CoordinateSystemUtilities.RadiansToDegrees(1.5707963267948966 - 2.0 * Math.Atan(Math.Exp(-num3 / 6378137.0))), CoordinateSystemUtilities.RadiansToDegrees(num2 / 6378137.0)));
        }