[OpenLayers-Users] Tiles outside maxExtent being loaded

Jon Blower jdb at mail.nerc-essc.ac.uk
Fri May 30 10:37:12 EDT 2008


Hi Chris,

Thanks for the reply.  Is it not possible (logically at least) to have
wrapDateLine=true and displayOutsideMaxExtent=false?  This seems to
make a lot of sense for the very common case of EPSG:4326.

Alternatively is there a method I can override to prevent tiles
outside the latitude range [-90,90] being loaded (e.g. by subclassing
Layer.WMS)?  I'm keen to do this because having 8 requests to my WMS
server (even if 6 of them are quickly rejected) not only causes
increased load on my server but also uses up some of the web browser's
image loading threads, slowing up my application considerably.

Cheers, Jon

On Fri, May 30, 2008 at 3:24 PM, Christopher Schmidt
<crschmidt at metacarta.com> wrote:
> On Fri, May 30, 2008 at 01:48:36PM +0100, Jon Blower wrote:
>> I've noticed that in my application OpenLayers is requesting tiles
>> outside the maximum extent of my overlay layer (which is in EPSG:4326
>> and hence has a maxExtent of -180,-90,180,90).  I've checked using the
>> Firebug console that the maxExtent is correctly set.  wrapDateLine is
>> set true.
>
> wrapDateLine forces displayOutsideMaxExtent, which is why you are seeing
> the behavior you are seeing.
>
>>
>> Is there any way of preventing these tiles from being loaded?
>
> Turn off wrapDateLine.
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
>



-- 
--------------------------------------------------------------
Dr Jon Blower Tel: +44 118 378 5213 (direct line)
Technical Director Tel: +44 118 378 8741 (ESSC)
Reading e-Science Centre Fax: +44 118 378 6413
ESSC Email: jdb at mail.nerc-essc.ac.uk
University of Reading
3 Earley Gate
Reading RG6 6AL, UK
--------------------------------------------------------------



More information about the Users mailing list