谷歌地图API-InfoBubble赢得't关闭-关闭()不会'不起作用

Google Maps API - InfoBubble won't close - close() doesn't work

本文关键字:关闭 不起作用 不会 API-InfoBubble 赢得 谷歌地图      更新时间:2023-09-26

我正在使用Google Maps InfoBubble。除了close()功能外,其他功能都很好。以前我使用InfoWindows,它在那里工作。

顺便说一句,Firebug没有报告任何错误。

我的InfoBubble是这样的:

var infoBubble = new InfoBubble({
      map: map,
      content: $('#balloon-container').html(),
      position: new google.maps.LatLng(areas[area].lat, areas[area].lng),
      shadowStyle: 1,
      padding: 0,
      borderRadius: 0,
      arrowSize: 10,
      borderWidth: 1,
      borderColor: '#ccc',
      disableAutoPan: true,
      hideCloseButton: true,
      arrowPosition: 15,
      arrowStyle: 0
    });

如果我执行以下命令,所有气泡都会打开:

infoBubble.open();
infoBubble.close();

有什么想法吗?

谢谢,

Ron

infoBubble.setMap(null)怎么样??