Esempio n. 1
0
 public GeoExtent TileLatLonBounds(int tx, int ty, int zoom)
 {
     GeoExtent retval = new GeoExtent();
     try
     {
         var bounds = this.TileBounds(tx, ty, zoom);
         var min = this.MetersToLatLon(bounds.West, bounds.South);
         var max = this.MetersToLatLon(bounds.East, bounds.North);
         retval = new GeoExtent() { North = max.Y, South = min.Y, East = max.X, West = min.X };
         return retval;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
 public GeoExtent TileBounds(int tx, int ty, int zoom)
 {
     GeoExtent retval = new GeoExtent();
     try
     {
         var min = this.PixelsToMeters(tx * this.tileSize, ty * this.tileSize, zoom);
         var max = this.PixelsToMeters((tx + 1) * this.tileSize, (ty + 1) * this.tileSize, zoom);
         retval = new GeoExtent() { North = max.Y, South = min.Y, East = max.X, West = min.X };
         return retval;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }