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

Favre, Sebastien Sebastien.Favre at spotimage.fr
Tue May 17 11:06:52 EDT 2011


Eric,

I confirm that when there is no feature of the layer in current map extent, getDataExtent() returns NULL (BBOX strategy) !
Once there is at least 1 feature of the layer in current map extent, getDataExtent() returns the good value.
Have you tried it ?
Maybe, I have missed something (a parameter ? an option ?)
Thank you.

Sébastien

-----Message d'origine-----
De : Eric Lemoine [mailto:eric.lemoine at camptocamp.com] 
Envoyé : mardi 17 mai 2011 16:37
À : Favre, Sebastien
Cc : openlayers-users at lists.osgeo.org
Objet : Re: [OpenLayers-Users] WFS layer data extent and loading strategies

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

-------------- next part --------------

Ce courrier électronique et toutes les pièces éventuellement jointes qu?il contient sont CONFIDENTIELS et destinés exclusivement à l?usage de leur destinataire. Si une erreur de transmission ou une adresse erronée a mal dirigée ce courrier, merci d?en informer l?expéditeur en lui faisant une réponse par courrier électronique dès réception. Si vous n?êtes pas le destinataire de ce courrier, vous ne devez pas l?utiliser, le conserver, en faire état, le distribuer, le copier, l?imprimer ou en révéler le contenu à une tierce partie.
Ce courrier électronique est à usage strictement informatif et ne saurait engager de quelque manière que ce soit SPOT IMAGE SA, ni ses filiales.

This e-mail and any attachments hereto are CONFIDENTIAL and intended solely for the use of the addressee. If you have received this e-mail in error please send it back to the person that sent it to you.
If you have received it in error, please notify the sender by return email. If you are not the addressee of this email, you must not use, keep, disseminate, copy, print or otherwise deal with it.
This email is for information only and will not bind SPOT IMAGE SA in any contract or obligation, nor its subsidiaries.


More information about the Users mailing list