Google maps InfoBubble.JS中的Google地图InfoBubble错误

Google maps InfoBubble.JS中的Google地图InfoBubble错误,google-maps,google-maps-api-3,google-maps-markers,google-street-view,Google Maps,Google Maps Api 3,Google Maps Markers,Google Street View,我试图在谷歌全景/街景中创建一个信息泡沫。它看起来不错,感觉也不错。但是我的浏览器控制台有一个错误,比如 var mapDiv = map.getDiv(); ***uncaught typeerror: undefined is not a function(REPEATED 16 TIMES)*** var gutter = arrowSize * 2; var mapWidth = mapDiv.offsetWidth - gutter; var mapHeight = mapDiv

我试图在谷歌全景/街景中创建一个信息泡沫。它看起来不错,感觉也不错。但是我的浏览器控制台有一个错误,比如

var mapDiv = map.getDiv();
   ***uncaught typeerror: undefined is not a function(REPEATED 16 TIMES)***
var gutter = arrowSize * 2;
var mapWidth = mapDiv.offsetWidth - gutter;
var mapHeight = mapDiv.offsetHeight - gutter - this.getAnchorHeight_();
var tabHeight = 0;
var width = /** @type {number} */ (this.get('minWidth') || 0);
var height = /** @type {number} */ (this.get('minHeight') || 0);
....
....
....
这是我的信息气泡代码:

infoBubble = new InfoBubble({
      minHeight: 350,
      shadowStyle: 0,
      padding: 0,
      borderRadius: 13,
      arrowSize: 0,
      borderWidth: 0,
      borderColor: '#2c2c2c',
      disableAutoPan: true,
      hideCloseButton: true,
      arrowPosition: 50,
      arrowStyle: 2
    });

我的猜测是,我们必须用infoBubble代码添加mapDiv。但我不知道是怎么回事

您使用的是API v2还是API v3?请相应地更正您的标签。谢谢您的回复。。。我正在使用api3“