[OpenLayers-Users] Zoom to a Layer's Extent

Bill Thoen bthoen at gisnet.com
Fri Sep 5 13:30:20 EDT 2008


Never mind... I just figured out that getDataExtent() applies to 
markers, not features like polygons and linestrings.  Does anybody know 
if there is a function for WFS layers that returns the bounding box of 
that layer regardless of what type of map objects it contains?

Bill Thoen wrote:
> If I set a listener for loadend and the function called checks to make 
> sure that there are features loaded, then why does 
> myStates.getDataExtent() return null? Shouldn't this function return the 
> bounds of the features now loaded into this layer?  Or are the bounds 
> not updated when a WFS layer is loaded?
>   




More information about the Users mailing list