code: function() {
          // workaround for resizing of invisible or not yet fully loaded layers
          // where GMap2.checkResize() does not work. We need to load the GMap
          // for the old div size, then checkResize(), and then call
          // layer.moveTo() to trigger GMap.setCenter() (which will finish
          // the GMap initialization).
          if(this.visibility && this.mapObject.isLoaded()) {
              this.mapObject.checkResize();
          } else {
              if(!this._resized) {
                  var layer = this;
                  var handle = GEvent.addListener(this.mapObject, "load", function() {
                      GEvent.removeListener(handle);
                      delete layer._resized;
                      layer.mapObject.checkResize();
                      layer.moveTo(layer.map.getCenter(), layer.map.getZoom());
                  });
              }
              this._resized = true;
          }
      }
docs: APIMethod: onMapResize