[OpenLayers-Users] mapExtents for Layer vs mapExtents for Map
srweal
srweal at gmail.com
Mon Nov 23 03:27:48 EST 2009
I am seeing behavior different to what you describe. I have a WMS layer
providing data over Australia (using tilecache.py) and if I set it up to
have no BBOX restriction set on the TileCache, then transparent tiles are
requested and provided when my map viewport is showing other parts of the
world (e.g. zoomed in on Africa).
However, if I set a BBOX restriction on my TileCache and also set the same
as a maxExtent on the WMS layer, then I get pink tiles displayed over Africa
when I zoom in there, while my actual data tiles display over Australia when
it is in the viewport. I was expecting to have no tiles requested when
zoomed on Africa with the maxExtent of my WMS set to Australia. Something
must be wrong.
I've checked my settings a few times now, but being fairly new to OpenLayers
I wonder what I might be missing. Can anyone else test this and confirm
that this does/doesn't work?
Ta, Steve
Andreas Hocevar-2 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.
>
> Regards,
> Andreas.
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/mapExtents-for-Layer-vs-mapExtents-for-Map-tp4036288p4049707.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list