// this gives the difference between integer positions and floating positions
dx = dx - (tile.getCache().getLayerBounds().getX() - panOrigin.getX());
dy = dy - (tile.getCache().getLayerBounds().getY() - panOrigin.getY());
// now apply to our bounds
Bbox worldBounds = new Bbox(tile.getBounds());
worldBounds.translate(-dx, -dy);
// transform to pan space and round
Bbox panBounds = mapView.getWorldViewTransformer().worldToPan(worldBounds);
return new Bbox(Math.round(panBounds.getX()), Math.round(panBounds.getY()), Math.round(panBounds.getWidth()),
Math.round(panBounds.getHeight()));
}