[OpenLayers-Trac] Re: [OpenLayers] #2828: Map Disappears Resizing Google V3 Layer

OpenLayers trac-20090302 at openlayers.org
Sat Sep 11 06:57:24 EDT 2010


#2828: Map Disappears Resizing Google V3 Layer
-----------------------------+----------------------------------------------
 Reporter:  atogle           |       Owner:              
     Type:  bug              |      Status:  new         
 Priority:  minor            |   Milestone:  2.11 Release
Component:  Layer.Google.v3  |     Version:  2.10        
 Keywords:                   |       State:  Review      
-----------------------------+----------------------------------------------
Changes (by ahocevar):

  * state:  => Review


Comment:

 Thanks atogle for this excellent bug report. It made it easy for me to
 find out what's wrong here.

 The problem is: we should not perform any action in setGMapVisibility when
 moveTo was called from the GMap's tilesloaded handler. Also, we only need
 to create the tilesloaded handler once, since we share the container.

 My solution is the _resized flag from the instance to the cache, unset it
 after the moveTo and perform action in setGMapVisibility only when the
 flag is not set. This not only fixes the issue, but also avoids
 unnecessary moveTo and and setGMapVisibility calls.

 Tests still pass. Thanks for any review.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/2828#comment:1>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list