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

Andreas Hocevar ahocevar at opengeo.org
Mon Nov 23 02:28:48 EST 2009


srweal wrote:
> Thanks Andreas and Eric for your responses.  But I still have one remaining
> question.
>
> If I set maxExtents on a WMS overlay layer and it is smaller than the
> maxExtents of my map, will tiles be requested from the WMS (or TileCache)
> for areas that are outside the bounds specified for the WMS layer, but still
> within the viewport that is showing the larger extent of the map?
>   

Only if you set displayOutsideMaxExtent to true.

Regards,
Andreas.

> Steve
>
>
> Andreas Hocevar-2 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.
>>
>>     
>>> I'm particularly interested in whether they each limit the tiles
>>> requested
>>> from the servers.  My situation is that I have a large extent I want
>>> visible
>>> on the map, but have multiple different layers that each provide tiles
>>> for
>>> smaller parts of the map extent, so I want them to only request tiles
>>> from
>>> the appropriate areas.  
>>>   
>>>       
>> In that case you would set a large maxExtent of the map (or base layer), 
>> and small maxExtents for your other layers.
>>
>> 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
>>
>>
>>     
>
>   


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.




More information about the Users mailing list