void encodeDocumentContents(Document container) {
WMSMapContent mapContent = context.getMapContent();
GetMapRequest request = context.getRequest();
Map formatOptions = request.getFormatOptions();
LookAtDecoratorFactory lookAtFactory = new LookAtDecoratorFactory();
LookAtOptions lookAtOptions = new LookAtOptions(formatOptions);
// compute the layer bounds and the total bounds
List<ReferencedEnvelope> layerBounds = new ArrayList<ReferencedEnvelope>(mapContent
.layers().size());
ReferencedEnvelope aggregatedBounds = computePerLayerQueryBounds(mapContent, layerBounds,