OpenLayers OpenLayers

Ticket #366 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Error switching between different Google layers

Reported by: jlivni Assigned to:
Priority: blocker Milestone: 2.2 Release
Component: Layer.Google Version: 2.2 RC2
Keywords: google layer switching Cc:
State:

Description (Last modified by euzuro)

Switching between two google layers (eg hybrid and normal) results in various errors (eg 'originPx has no properties'). I note that if I do a couple of zoom functions after the error, switching between layers will then work.

Example code to reproduce:

function init(){
            var map = new OpenLayers.Map( $('map'));
            var hybrid = new OpenLayers.Layer.Google( "Google Hybrid" , {type: G_HYBRID_MAP} );
            var gnormal = new OpenLayers.Layer.Google( "Google Regular" , {type: G_NORMAL_MAP} );

            map.addLayers([gnormal, hybrid]);

            map.addControl( new OpenLayers.Control.LayerSwitcher() );
            map.setCenter(new OpenLayers.LonLat(-118, 33), 7);
        }

Attachments

gmap_switch.patch (0.7 kB) - added by euzuro on 11/08/06 11:16:07.

Change History

10/22/06 16:28:19 changed by euzuro

  • description changed.

10/25/06 10:33:44 changed by euzuro

  • owner set to euzuro.
  • component changed from general to Layer.Google.

11/02/06 14:58:36 changed by crschmidt

  • milestone set to 2.2 Release.

11/03/06 14:10:43 changed by euzuro

  • priority changed from major to blocker.

11/08/06 11:11:02 changed by euzuro

  • status changed from new to assigned.

11/08/06 11:16:07 changed by euzuro

  • attachment gmap_switch.patch added.

11/08/06 11:17:28 changed by euzuro

  • keywords changed from google layer switching to google layer switching review.

have added patch to fix this bug. please review

11/08/06 12:35:33 changed by euzuro

  • owner deleted.
  • status changed from assigned to new.

11/08/06 16:00:11 changed by euzuro

real fix for this would be to just make sure that the google layer gets elegantly initialized to a lonlatzoom *before* this centerlayer gets called.

11/08/06 16:02:37 changed by crschmidt

For now, I've applied to existing patch (r1778) and it's ready for pullup to the 2.2 branch.

11/08/06 16:03:03 changed by crschmidt

  • keywords changed from google layer switching review to google layer switching pullup.

11/08/06 19:10:37 changed by euzuro

  • keywords changed from google layer switching pullup to google layer switching.
  • status changed from new to closed.
  • version set to 2.2 RC2.
  • resolution set to fixed.

pulled up to 2.2 branch with r1785