[OpenLayers-Dev] resolutions/scales question

Eric Lemoine eric.c2c at gmail.com
Tue Oct 28 13:12:18 EDT 2008


So setting [min|max]Resolution in the options passed to an overlay
should switch the overlay on/off when it goes in range/out of range.

I have collegues here that have problems with doing that. They had to
resort to doing:

var layer = new ...
layer.maxResolution = value;
layer.alwaysInRange = false;

to make things work as expected.

I'll check with them if we can come up with an actual test case for this.

Thanks,

Eric

2008/10/28, Christopher Schmidt <crschmidt at metacarta.com>:
> On Tue, Oct 28, 2008 at 10:00:34AM -0600, Tim Schaub wrote:
>> Hey-
>>
>> Eric Lemoine wrote:
>> > Hi devs
>> >
>> > I have a question related to resolutions and overlays. initResolutions
>> > calculates the resolutions array. Is this at actually needed for
>> > overlays? Don't overlays always use the resolutions defined in the
>> > base layer?
>>
>> Yep, they do.  So, layer.resolutions is ignored for all but the base
>> layer.
>
> The first and last entry in layer.resolutions are used in any case where
> the layer believes that it has a 'valid' range to be on/off.
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>



More information about the Dev mailing list