I noticed that the resize method in the kaMap object is calling getLayers on map even though map is not declared or initialized. var layers =map.getLayers(); Shouldn't this be: var oMap = this.getCurrentMap(); var layers = oMap.getLayers();