renderers.put(layer, tileRenderer);
}
public BufferedImage renderTile(final TileRequest tileRequest, String layer) {
TileRenderContext context = new TileRenderContext() {
@Override
public Envelope expandPixels(double marginXPixels, double marginYPixels) {
Envelope retval = new Envelope(bbox);
retval.expandBy(
marginXPixels / tileRequest.width * (bbox.getMaxX() - bbox.getMinX()),