long maxY = maxRow == null? intersect[3] : Math.min(maxRow, intersect[3]);
for (long x = minX; x <= maxX; x++) {
for (long y = minY; y <= maxY; y++) {
BoundingBox box = gridSubset.boundsFromIndex(new long[] { x, y, z });
req.setBbox(new Envelope(box.getMinX(), box.getMaxX(), box.getMinY(), box.getMaxY()));
WebMap result = webMapService.getMap(req);
tiles.addTile(z, (int) x, (int) (flipy ? gridSubset.getNumTilesHigh(z)
- (y + 1) : y), toBytes(result));
// Cleanup
cleaner.finished(null);
}