Lots of spurious tiles get loaded when changing base layer

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Lots of spurious tiles get loaded when changing base layer

Jon Blower
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.

Cheers, Jon

--
--------------------------------------------------------------
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: [hidden email]
University of Reading
3 Earley Gate
Reading RG6 6AL, UK
--------------------------------------------------------------

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users

testProj.html (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Lots of spurious tiles get loaded when changing base layer

Eric Lemoine
On Tue, May 27, 2008 at 2:42 PM, Jon Blower <[hidden email]> 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)

--
Eric
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Lots of spurious tiles get loaded when changing base layer

Eric Lemoine
On Wed, May 28, 2008 at 10:06 PM, Eric Lemoine <[hidden email]> wrote:

> On Tue, May 27, 2008 at 2:42 PM, Jon Blower <[hidden email]> 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)

http://nsidc.org/data/atlas/epsg_32661.html gives differing
information so I'm confused.

--
Eric
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Lots of spurious tiles get loaded when changing base layer

Christopher Schmidt-2
In reply to this post by Eric Lemoine
On Wed, May 28, 2008 at 10:06:40PM +0200, Eric Lemoine wrote:

> On Tue, May 27, 2008 at 2:42 PM, Jon Blower <[hidden email]> 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
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Lots of spurious tiles get loaded when changing base layer

Jon Blower
> 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
<[hidden email]> 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 <[hidden email]> 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: [hidden email]
University of Reading
3 Earley Gate
Reading RG6 6AL, UK
--------------------------------------------------------------
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Lots of spurious tiles get loaded when changing base layer

Eric Lemoine
On Wed, May 28, 2008 at 10:54 PM, Jon Blower <[hidden email]> wrote:

>> 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.

I think this is an OL bug and therefore deserves a ticket. Jon, would
you mind filing one out? Thanks,

--
Eric
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Lots of spurious tiles get loaded when changing base layer

Jon Blower
Bug filed (http://trac.openlayers.org/ticket/1574).

Cheers, Jon

On Thu, May 29, 2008 at 5:53 AM, Eric Lemoine <[hidden email]> wrote:

> On Wed, May 28, 2008 at 10:54 PM, Jon Blower <[hidden email]> wrote:
>>> 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.
>
> I think this is an OL bug and therefore deserves a ticket. Jon, would
> you mind filing one out? Thanks,
>
> --
> Eric
>



--
--------------------------------------------------------------
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: [hidden email]
University of Reading
3 Earley Gate
Reading RG6 6AL, UK
--------------------------------------------------------------
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Smooth panning and zoom problem

kusum-3
Hiii All
 
I am migrating from Openlayers 5.0 to Openlayers 6.0.
In last version I changed some settings in openlayers.js for smooth panning (so that map disappear on panning)
and to give a blue effect on zoom in as in google
But I don't remember that setting to to change the Ver 6.0 Openlayers.js file.
 
Pls help if someone knows those settings
 
Thanks in advance
 
Kusum

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Smooth panning and zoom problem

kusum-3
correction to mail below
 I want help regarding smooth panning (so that map does not disappear on panning) actually by mistake I wrote  smooth panning (so that map disappear on panning)
Sent: Friday, June 06, 2008 4:08 PM
Subject: [OpenLayers-Users] Smooth panning and zoom problem

Hiii All
 
I am migrating from Openlayers 5.0 to Openlayers 6.0.
In last version I changed some settings in openlayers.js for smooth panning (so that map disappear on panning)
and to give a blue effect on zoom in as in google
But I don't remember that setting to to change the Ver 6.0 Openlayers.js file.
 
Pls help if someone knows those settings
 
Thanks in advance
 
Kusum


_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Smooth panning and zoom problem

Paul Spencer
In reply to this post by kusum-3
add transitionEffect: 'resize' to your layer options (the fourth  
parameter)

Cheers

Paul

On 6-Jun-08, at 6:38 AM, Kusum wrote:

> Hiii All
>
> I am migrating from Openlayers 5.0 to Openlayers 6.0.
> In last version I changed some settings in openlayers.js for smooth  
> panning (so that map disappear on panning)
> and to give a blue effect on zoom in as in google
> But I don't remember that setting to to change the Ver 6.0  
> Openlayers.js file.
>
> Pls help if someone knows those settings
>
> Thanks in advance
>
> Kusum
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Smooth panning and zoom problem

Piero Campa
Hi Paul, what did you mean with that "the fourth paramter" ... ?

I set the transitionEffect to a Google base layer without success, no smooth zoom/pan yet.

                var gmap = new OpenLayers.Layer.Google(
                    "Google Streets", {
                          sphericalMercator: true,
                          numZoomLevels: OpenLayers.Layer.Google.MAX_ZOOM_LEVEL,
                          transitionEffect: 'resize'
                });

Any clue?
Piero
Reply | Threaded
Open this post in threaded view
|

Re: Smooth panning and zoom problem

Piero Campa
It seems it's not an OL feature for Google layers.
http://osgeo-org.1803224.n2.nabble.com/Zoom-effect-like-google-map-possible-td3898241.html#a3898393

OL developers: do you know if it will be an available feature for Google Layers also, some day?

Thank you anyway.
Piero
Reply | Threaded
Open this post in threaded view
|

Re: Smooth panning and zoom problem

Andreas Hocevar-2
Hi,

with the GMaps v2 API, we do not have smooth zooming in OpenLayers. If you use the GMaps v3 API (supported by OpenLayer trunk, see http://openlayers.org/blog/2010/07/10/google-maps-v3-for-openlayers/), you may have animated zooming, depending on your browser (e.g. Safari has it, Firefox does not - try http://www.openlayers.org/dev/examples/google-v3.html). But the GMaps API does not give us control over it.

See (and vote for if you care) http://code.google.com/p/gmaps-api-issues/issues/detail?id=2011

Regards,
Andreas.

On Jul 20, 2010, at 11:47 , Piero Campa wrote:

>
> It seems it's not an OL feature for Google layers.
> http://osgeo-org.1803224.n2.nabble.com/Zoom-effect-like-google-map-possible-td3898241.html#a3898393
>
> OL developers: do you know if it will be an available feature for Google
> Layers also, some day?
>
> Thank you anyway.
> Piero
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Lots-of-spurious-tiles-get-loaded-when-changing-base-layer-tp1829173p5315941.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users



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

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users