Excerpts from Tim Michelsen's message of Tue Apr 21 15:38:12 -0400 2009: > Hello, > does Openlayers have a feature like > zoom to layer? > > Like in many desktop GIS where you can use this to get automatically to > an adequate extend and zoom level.
Do you mean "zoom to best fit the data on a layer"? For that, I use the getDataExtent() function. E.g., if I want to show the data on myLayer: map.zoomToExtent(myLayer.getDataExtent()); See http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.getDataExtent -Nick > > Regards, > Timmie > _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users