[OpenLayers-Users] transitionEffect for WFS layer possible?

Andreas Hocevar ahocevar at opengeo.org
Sun Apr 19 05:53:57 EDT 2009


Hi,

sorry for this late reply, but it took me until today to find some time 
to see what is going on here.

Kris Geusebroek wrote:
> Succesfully used the nightly build with BBOX strategy and WFS protocol
> to refresh my layer without blinking.
> This gives me a very good user experience.
>
> Had to make a minor chage to the code though:
>
> In Strategy.BBOX update method the options.force is checked.
> This didn't work the way I expected (namely creating the strategie with
> new OpenLayers.Strategy.BBOX({force: true}) had no effect)
> Seems that in Strategy.js the options are extended to with
> OpenLayers.Util.extend(this, options) so this leaves us with a
> this.force parameter but not options.force I guess.
>   

I assume you refresh your layer by saying layer.refresh(). Instead, it 
would be enough to say layer.refresh({force: true}). No need to change 
the update method of the strategy.

Explanation: options in update() is the function argument, and calling 
layer.refresh({force: true}) will trigger the layer's refresh event with 
an event object that will be passed to the strategy's update method, 
which will be executed on the layer's refresh event.

Regards,
Andreas.

-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.




More information about the Users mailing list