I have a vector layer called grid. It gets added to the map when a value is
searched for and the geometry of a feature is returned. A vector layer gets
created with a red outline around this feature and the below code works fine
to zoom into this feature. Question is can I do this for multiple vector
layers? I was thinking if possible to add the "grid" layers to an array and
then somehow use the array/map.zoomToExtent to zoom to an extent where all
the grid layers can be seen properly. Is this possible? Appreciate any
advice.
//recenter on selection
grid.events.register("loadend", grid, function() {
map.zoomToExtent(grid.getDataExtent());
map.zoomOut();
map.zoomOut();
});
break;
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/ZoomToExtent-with-a-vector-layer-how-to-do-it-with-multiple-layers-tp5923703p5923703.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users