[OpenLayers-Users] mapExtents for Layer vs mapExtents for Map

Eric Lemoine eric.lemoine at camptocamp.com
Mon Nov 23 02:43:17 EST 2009


On Mon, Nov 23, 2009 at 8:28 AM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
> Eric Lemoine wrote:
>>
>> On Monday, November 23, 2009, Andreas Hocevar <ahocevar at opengeo.org>
>> wrote:
>>
>>>
>>> Hi,
>>>
>>> srweal wrote:
>>>
>>>>
>>>> Actually, to simplify this question a bit, can someone please just
>>>> explain
>>>> how the setting for mapExtents on a Layer, as opposed to setting
>>>> mapExtents
>>>> on the Map differ?
>>>>
>>>>
>>>
>>> The maxExtent of the active base layer takes precedence over the
>>> maxExtent of the map. For overlays, maxExtent is only used to determine
>>> if the layer is to be displayed or not, i.e. if it would be visible in
>>> the current viewport.
>>>
>>
>> are you sure about that Andreas? I thought only minResolution and
>> maxResolution were looked at to determine whether an overlay is to be
>> displayed. I may be wrong, and would appreciate being corrected and
>> pointed to the relevant code in that case. Thanks,
>>
>
> You are right, calculateInRange (which turns layer visibility on and off)
> only uses min/maxResolution. OpenLayers.Tile::draw determines tiles to be
> loaded by checking interectsBounds of the viewport with the layers
> maxExtent.

cool, never realized that. Thanks,

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