[OpenLayers-Dev] Control.GetFeature question

Bart van den Eijnden bartvde at osgis.nl
Fri Dec 18 04:42:14 EST 2009


Hi Andreas,

my problem is that I need 1 event before the WFS request is sent, so that I can clear my store for a grid. I also need one after all the featureselected events have finished for the box query, so that I know I am done and that I can reconfigure my grid with the new store.

The beforefeatureselected events are fired as many times as the featureselected, so that does not work for me.

Also, is there a good way to have both hover and box? When drawing a box, also the hover goes off, which is a bit unwanted IMHO.

Best regards,
Bart

On Dec 18, 2009, at 10:38 AM, Andreas Hocevar wrote:

> On 2009-12-18 09:59, Bart van den Eijnden wrote:
>> Hi list,
>> 
>> when the above mentioned control is used in box mode, for every retrieved feature a featureselected event is triggered with 1 feature.
>> 
>> Questions:
>> 1) why not 1 event with all the features in an array?
>> 
> 
> Because you can use the beforefeatureselected event to filter the
> features that trigger a featureselected event.
> 
>> 2) if the current approach is really necessary, I guess a before type event is necessary, for instance I am using an Ext.Store and I need to know when to clear the previous features.
>> 
> 
> Without breaking anything, you could easily add a
> "beforefeaturesselected" and "featuresselected" event, and maybe also
> the unselect counterparts.
> 
> Regards,
> Andreas.
> 
>> TIA for any pointers.
>> 
>> Best regards,
>> Bart
>> _______________________________________________
>> Dev mailing list
>> Dev at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
>> 
> 
> 
> -- 
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
> 
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
> 




More information about the Dev mailing list