Thie code is explained here...but it´s not working for me!
We have prepared everything now to finally add the layer to the map:
mapPanel.layers.add(clone);
mapPanel.map.zoomToExtent(
OpenLayers.Bounds.fromArray(clone.get("llbbox"))
);
To make the layer appear on the map, all we need to do is add the cloned record
to the map panel’s layer store. Zooming to the extent of the layer is important
for the first layer added, because it is part of the required inatialization
sequence of an OpenLayers.Map. For subsequent layers, it is convenient to see
the whole layer. The capabilities document provides the extent of the layer,
and
this information is stored in the record’s “llbox” field.
llbbox?
Rob
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users