code: public static int getZoomLevel(BoundingBox webMercatorBoundingBox) {
  
  		double worldLength = ProjectionConstants.WEB_MERCATOR_HALF_WORLD_WIDTH * 2;
  
  		double longitudeDistance = webMercatorBoundingBox.getMaxLongitude()
  				- webMercatorBoundingBox.getMinLongitude();
  		double latitudeDistance = webMercatorBoundingBox.getMaxLatitude()
  				- webMercatorBoundingBox.getMinLatitude();
  
  		if (longitudeDistance <= 0) {
  			longitudeDistance = Double.MIN_VALUE;
  		}
  		if (latitudeDistance <= 0) {
  			latitudeDistance = Double.MIN_VALUE;
  		}
  
  		int widthTiles = (int) (worldLength / longitudeDistance);
  		int heightTiles = (int) (worldLength / latitudeDistance);
  
  		int tilesPerSide = Math.min(widthTiles, heightTiles);
  		tilesPerSide = Math.max(tilesPerSide, 1);
  
  		int zoom = zoomFromTilesPerSide(tilesPerSide);
  
  		return zoom;
  	}
docs: Get the zoom level of where the web mercator bounding box fits into the
  complete world
  
  @param webMercatorBoundingBox
  web mercator bounding box
  @return zoom level