[OpenLayers-Dev] addOptions and redraw
Bart van den Eijnden
bartvde at opengeo.org
Wed Apr 11 09:24:39 EDT 2012
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? 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.
I'll come up with some examples showing the issues.
Best regards,
Bart
--
Bart van den Eijnden
OpenGeo - http://opengeo.org
Expert service straight from the developers.
On Apr 11, 2012, at 3:14 PM, Eric Lemoine wrote:
>
>
> On Wednesday, April 11, 2012, Bart van den Eijnden wrote:
> Another related question to my previous post.
>
> So I've worked around the previous issue by clearing alwaysInRange before calling addOptions.
>
> Then when I pass in minScale and maxScale options to addOptions that effectively will make the layer be out of scale, nothing happens, even after calling redraw.
>
> Am I missing something here? Why is the layer not turned off in this case, it only happens if I don't call redraw and manually pan the map.
>
>
>
> Do you use redraw(true)?
>
>
> --
> 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
> http://www.camptocamp.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20120411/217b81d9/attachment.html
More information about the Dev
mailing list