public static BoundingBox getWebMercatorBoundingBox ( long x , long y , int zoom ) { double tileSize = tileSizeWithZoom ( zoom ) ; double minLon = ( - 1 * ProjectionConstants . WEB_MERCATOR_HALF_WORLD_WIDTH ) + ( x * tileSize ) ; double maxLon = ( - 1 * ProjectionConstants . WEB_MERCATOR_HALF_WORLD_WIDTH ) + ( ( x + 1 ) * tileSize ) ; double minLat = ProjectionConstants . WEB_MERCATOR_HALF_WORLD_WIDTH - ( ( y + 1 ) * tileSize ) ; double maxLat = ProjectionConstants . WEB_MERCATOR_HALF_WORLD_WIDTH - ( y * tileSize ) ; BoundingBox box = new BoundingBox ( minLon , minLat , maxLon , maxLat ) ; return box ; }
Get the Web Mercator tile bounding box from the Google Maps API tile coordinates and zoom level