Fix for GMaps layers to display in correct position when they were originally

loaded as the not default layer, or the map is resized while the gmaps layer is
hidden. Patch put together by Edgemaster (thanks), (Closes #830)  


git-svn-id: http://svn.openlayers.org/trunk/openlayers@7300 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-05-31 17:19:48 +00:00
parent 57237e8a58
commit 66a19c70ef

View File

@@ -189,7 +189,26 @@ OpenLayers.Layer.Google = OpenLayers.Class(
* evt - {Event}
*/
onMapResize: function() {
this.mapObject.checkResize();
if(this.visibility) {
this.mapObject.checkResize();
} else {
this.windowResized = true;
}
},
/**
* Method: display
* Hide or show the layer
*
* Parameters:
* display - {Boolean}
*/
display: function(display) {
OpenLayers.Layer.EventPane.prototype.display.apply(this, arguments);
if(this.div.style.display == "block" && this.windowResized) {
this.mapObject.checkResize();
this.windowResized = false;
}
},
/**