[OpenLayers-Dev] initResolutions issue

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


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

> Hey,
>
> I am trying to set the minScale or maxScale of a layer using addOptions
> after it has been added to the map and drawn.
>
> However, with the current code of initResolutions, alwaysInRange is not
> updated unless it's null [1], which is preventing my options to have any
> effect.
>
> Is this to be expected?
>


I don't think so. It sounds like a bug to me.



>
> [1]
> https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Layer.js#L861
>


We may want to change this test to `if (this.options.alwaysInRange ===
null)`.


-- 
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/54638253/attachment.html


More information about the Dev mailing list