How to bound a map based on the MBR of a theme or querys results?
You can use the bounding_themes element in a map request. When a map request does not specify center/size or box, but has the bounding_themes element instead, then the result map will be automatically centered/sized to optimally contain the query results of the specified “bounding” themes. For more details please refer to the MapViewer User’s Guide section 3.2.2. Note that you can set bounding themes from the MapViewer Java API as well.