new Double[] { -122.6, 37.6, -122.3, 37.9 },
new Double[] { 10.0, 10.0, 20.0, 20.0 } };
Layer ol_wms = new WMS("OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0", toMap(pair("layers",
"basic")));
Vector boxes = new Vector("Boxes");
for (int i = 0; i < box_extents.length; i++) {
Bounds bounds = Bounds.fromArray(new ArrayList(box_extents[i]));
org.zkoss.openlayers.feature.Vector box = new org.zkoss.openlayers.feature.Vector(
bounds.toGeometry());
boxes.addFeature(box);
}
map.addLayers(Arrays.asList(ol_wms, boxes));
map.addControl(new LayerSwitcher());
Control sf = new SelectFeature(boxes);