[OpenLayers-Dev] addOptions and redraw

Eric Lemoine eric.lemoine at camptocamp.com
Wed Apr 11 09:41:58 EDT 2012

On Wednesday, April 11, 2012, Bart van den Eijnden wrote:

> Hey Eric,
> thanks for your quick replies being at FOSS4GNA.
> I wasn't, and mainly because I was looking at Layer.js where redraw has no
> argument:
> https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Layer.js#L553
> But I see HTTPRequest has the boolean argument:
> https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Layer/HTTPRequest.js#L146
> But I should not have to call force to get the layer to hide if it's out
> of scale right?

Right. I initially thought you needed to reload images.

"force" places a random value in the query string. This is to "break" the

Have you tried calling layer.display()?

> Force is just to always fetch a new image from the server.
> However, calling redraw(true) does not make the layer disappear
> unfortunately.
> When zooming the overlay is also out of sync with the basemap, not sure if
> this is directly related to the redraw call though.

Sorry I'm not sure I understand what you mean by "out of sync".

You may be hit by <https://github.com/openlayers/openlayers/pull/393>.

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.lemoine at camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20120411/ec45acd6/attachment.html

More information about the Dev mailing list