On Mon, Mar 8, 2010 at 7:02 PM, Armin Burger <armin.bur...@gmx.net> wrote:
> Hi all
>
> I'm currently trying to test OpenLayers for an application with a
> catalogue search interface. The layer which is queried is based on
> PostGIS and retrieved from OL as WMS layer based on Mapserver/MapScript.
> The search parameters chosen by the user are defining dynamically the
> filter for the layer on the server.
>
> This requires the layer to be completely refreshed and reloaded again
> from the server after a change of search parameters. The only
> possibility to force a complete refresh I found was to use the
> Layer.destroy() method (for Grid based layers) since this should clear
> the grid. The docs state it should "Deconstruct the layer and clear the
> grid.". After the destroy the layer is created again and added to the map.
>
> This works fine for Firefox and IE, but in Google Chrome this destroy()
> seems not to clear the grid. In Chrome the tiles remain the same and are
> not requested again from the server.
>
> Did anybody already notice such a behaviour as well? Could I try to use
> other methods to refresh/clear the layer grid?

Hi. I just opened <http://www.openlayers.org/dev/examples/wms.html> in
Chromium, and entered map.layers[0].destroy() in the JavaScript
console of the developer tools. And it worked as expected, the layer
is destroyed will all the tiles removed from the map. It'd be great if
you could come up with a simple example demonstrating the problem.
Sorry for the delayed response.



-- 
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.lemo...@camptocamp.com
http://www.camptocamp.com
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to