[OpenLayers-Users] Base Layers and maxResoution/minResolution

Eric Lemoine eric.lemoine at camptocamp.com
Thu Jun 24 07:31:39 EDT 2010


On Thu, Jun 24, 2010 at 1:11 PM, David Alda Fernandez de Lezea
<dalda at ikt.es> wrote:
>
> Hi list,
>
> I was wondering if it's possible to get the same effect of switching on/off some layers depending on maxResolution/minResolution values but in base layers. Has anyone achieve this task??

Hi.

You can use trunk and the following options in your baselayer:

{
    maxResolution: ...,
    minResolution: ...,
    resolutions: [..., ..., ...]
}

If you have resolutions set in the map use these options in the
baselayer instead:

{
    maxResolution: ...,
    minResolution: ...,
    numZoomLevels: null
}

Note  that this behavior is new (hence the need to use trunk) and that
the corresponding ticket [*] has been reopened lately, which means
that things may change again before the 2.10 release.

[*] <http://trac.openlayers.org/ticket/2427>


-- 
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



More information about the Users mailing list