[OpenLayers-Users] WFS layer data extent and loading strategies

Eric Lemoine eric.lemoine at camptocamp.com
Tue May 17 10:37:05 EDT 2011


2011/5/17 Favre, Sebastien <Sebastien.Favre at spotimage.fr>:
> Hello Eric,
>
> I have tried to use : wfs.events.on({'loadend': function() { var extent = wfs.getDataExtent(); }}); But when the loading strategy is BBOX, extent is NULL if there is no feature to display on the map current bounding box.
> If there are some features to display from the layer , extent has a value.
> If the loading strategy is FIXED, extent has always a value.
> It seems logical but do you have any alternative to get data extent of a layer with BBOX loading strategy ?

getDataExtent returns the extent of the features currently in the
layer, whatever strategy you use.

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list