Exemplo n.º 1
0
        public TileReplace TileFromWgs84ToSpherical(int wgs84TileIndexX, int wgs84TileIndexY, int zoom)
        {
            var leftTop = TileMathBase.TileXY2PixelXY(wgs84TileIndexX, wgs84TileIndexY);
            var latlon  = Wgs84TileMath.PixelXYToLatLong(leftTop.X, leftTop.Y, zoom);

            SphericalTileMath.LatLongToPixelXY(latlon.X, latlon.Y, zoom, out int pixelX, out int pixelY);
            return(FindReplace(wgs84TileIndexX, wgs84TileIndexY, zoom, new Point(pixelX, pixelY)));
        }
Exemplo n.º 2
0
        public TileReplace TileFromSphericalToWgs84(int sphericalTileIndexX, int sphericalTileIndexY, int zoom)
        {
            var leftTop = TileMathBase.TileXY2PixelXY(sphericalTileIndexX, sphericalTileIndexY);

            SphericalTileMath.PixelXYToLatLong(leftTop.X, leftTop.Y, zoom, out double latitude, out double longitude);
            var resultXY = Wgs84TileMath.LatLongToPixelXY(latitude, longitude, zoom);

            return(FindReplace(sphericalTileIndexX, sphericalTileIndexY, zoom, resultXY));
        }