[OpenLayers-Users] design advice

Pierre GIRAUD bluecarto at gmail.com
Wed May 30 08:41:08 EDT 2007


Did you try having something similar to WMS reload hacks. I mean using
mergeNewParams() with a randomized parameter.
http://openlayers.org/pipermail/users/2007-April/001455.html

You may also have a look at the refresh method available for vector layers.

Regards.

Pierre

On 5/30/07, Roger Kunkel <rakunkel at ucdavis.edu> wrote:
>
> Hi,
>
> I'm in need of some design advice.
>
> My application uses a vector layer created via a WFS call with a Filter to
> query and display intersecting geometries.
> This generally works well, but I need to alter the Filter and reload the
> result frequently. So far, I've been destroying the
> vector layer and creating a new one each time. Is this an inefficient
> approach? and what sequence of methods should I use?
> I noticed there is a removeFeatures() and a destroyFeatures() function in
> vector.js.
>
> Should I just use destroy() and recreate the layer or use removeFeatures()
> and somehow reload the layer.
> I also use the selectFeature control - should it also be destroyed and
> recreated.
>
> Thoughts and sample code appreciated.
>
>
>
>
> Roger Kunkel
> CERES Program
> Dept. of Land Air & Water Resources
> UC Davis
> rakunkel at ucdavis.edu
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>



More information about the Users mailing list