[OpenLayers-Users] mapExtents for Layer vs mapExtents for Map
Andreas Hocevar
ahocevar at opengeo.org
Mon Nov 23 02:28:01 EST 2009
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.
Regards,
Andreas.
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list