[OpenLayers-Users] Lots of spurious tiles get loaded when changing base layer

Jon Blower jdb at mail.nerc-essc.ac.uk
Wed May 28 16:54:23 EDT 2008


> Those extents are in degrees, not projected units.
That's right.  The extent of -180,60,180,90 is just an approximation
(and not a very good one) in lat-lon. The extent in the units of the
projection (metres, notionally) is -10700000, -10700000, 14700000,
14700000.  So I think I'm doing the right thing.

Regarding the spurious tiles it seems to be that a load of new tiles
get loaded before the maximum extent of the layer can be changed.
Presumably the bounding boxes of the tiles need to be recalculated as
soon as the projection changes and before any new tiles are loaded.

Cheers, Jon

On Wed, May 28, 2008 at 9:46 PM, Christopher Schmidt
<crschmidt at metacarta.com> wrote:
> On Wed, May 28, 2008 at 10:06:40PM +0200, Eric Lemoine wrote:
>> On Tue, May 27, 2008 at 2:42 PM, Jon Blower <jdb at mail.nerc-essc.ac.uk> wrote:
>> > Hi,
>> >
>> > I have an OL2.6 application that uses base layers in different map
>> > projections.  The map is initially constructed with a base layer in
>> > lat-lon (EPSG:4326).  If I change the base layer to a layer in polar
>> > stereographic projection (EPSG:32661) the map loads a whole load (up
>> > to 40) of spurious tiles.  This effect can be seen by loading the
>> > attached example web page and using Firebug (or similar) to examine
>> > the outgoing GetMap requests.  The spurious tiles have a bounding box
>> > that is inappropriate for the current zoom level and map extent (this
>> > shows up clearly because the extents for 4326 and 32661 are very
>> > different in their native units).
>> >
>> > Registering an event listener for changebaselayer does not help: it
>> > seems that the spurious tiles are loaded anyway.
>>
>> Based on http://spatialreference.org/ref/epsg/32661/ the bounds for
>> 32661 are -180.0 60.0 180.0 90.0 so I don't understand the values
>> you're using. (That might not explain the spurious tiles you're seeing
>> though)
>
> Those extents are in degrees, not projected units.
>
> 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