[Users] Adding a feature to map zooms to hightest zoom level: why?
Robert Buckley
robertdbuckley at yahoo.com
Thu Jan 13 11:00:30 CET 2011
Hi,
I have an ext window that reads my getcapabilities doc. thee BBar has a button
which then add the layer to the map. However, when this is added it is zoomed
right the way in to the largest scale.
Why is this not working as it should?
thanks for any help...
here is the code
bbar: [{
text: "Add To Map",
handler: function() {
capabilitiesgrid.getSelectionModel().each(function(record) {
var clone = record.clone();
clone.get("layer").mergeNewParams({
format: "image/png",
transparent: true
});
mapPanel.layers.add(clone);
map.zoomToExtent(
OpenLayers.Bounds.fromArray(clone.get("llbbox"))
);
});
}
}]
yours,
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110113/b2d407c3/attachment.htm
More information about the Users
mailing list