OpenLayers OpenLayers

Ticket #830: 830.Google.patch

File 830.Google.patch, 0.9 kB (added by edgemaster, 2 years ago)

Patch based upon #830#comment:4, briefly tested, seems to work as expected.

  • lib/OpenLayers/Layer/Google.js

    old new  
    189189     * evt - {Event} 
    190190     */ 
    191191    onMapResize: function() { 
    192         this.mapObject.checkResize();   
     192        if(this.visibility) { 
     193            this.mapObject.checkResize();   
     194        } else { 
     195            this.windowResized = true; 
     196        } 
    193197    }, 
     198     
     199    /** 
     200     * Method: display 
     201     * Hide or show the layer 
     202     * 
     203     * Parameters: 
     204     * display - {Boolean} 
     205     */ 
     206    display: function(display) { 
     207        OpenLayers.Layer.EventPane.prototype.display.apply(this, arguments); 
     208        if(this.div.style.display == "block" && this.windowResized) { 
     209            this.mapObject.checkResize(); 
     210            this.windowResized = false; 
     211        } 
     212    }, 
    194213 
    195214    /** 
    196215     * APIMethod: getZoomForExtent