private Openlayers map2;
public void doAfterCompose(Window comp) throws Exception {
super.doAfterCompose(comp);
// set up some layers
Layer ol = new WMS(
"OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0",
toMap(pair("layers", "basic"))
);
Layer jpl = new WMS(
"NASA Global Mosaic",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
toMap(pair("layers", "landsat7"))
);
// A clone of the above layer that we will use as overview for map2.
// We need to clone jpl before the it gets added to a map, so the
// clone can have its own maxExtent and maxResolution instead of
// getting these settings initialized from map1.
Layer jplOverview = (Layer)jpl.clone();
// A more detailled layer of Manhattan for map2
Layer ny = new WMS(
"Manhattan",
"http://demo.opengeo.org/geoserver/wms",
toMap(pair("layers", "tiger-ny"), pair("format", "image/png"))
);