[OpenLayers-Users] transitionEffect for WFS layer possible?
Kris Geusebroek
kgeusebroek at xebia.com
Sun Apr 19 06:14:15 EDT 2009
Hi,
Makes sense ;-) i will try this first thing tomorrow.
Cheers Kris
-----Original Message-----
From: Andreas Hocevar [mailto:ahocevar at opengeo.org]
Sent: Sunday, April 19, 2009 11:54 AM
To: Kris Geusebroek
Cc: Christopher Schmidt; Andreas Hocevar; users at openlayers.org
Subject: Re: [OpenLayers-Users] transitionEffect for WFS layer possible?
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