【问题标题】:Google Maps API - InfoBubble won't close - close() doesn't workGoogle Maps API - InfoBubble 不会关闭 - close() 不起作用
【发布时间】:2012-09-10 12:15:54
【问题描述】:

我正在使用 Google 地图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();

有什么想法吗?

谢谢,

罗恩

【问题讨论】:

    标签: javascript google-maps-api-3 google-maps-markers infobubble


    【解决方案1】:

    infoBubble.setMap(null) 怎么样??

    【讨论】:

    • 当然是你的解决方案...有趣的是他们在 infobubble 源代码中使用close()...
    • 哈哈。在这种情况下,标记答案将对社区有所帮助
    • stackoverflow 有 6 分钟的延迟 :) 现在我标记了它,再次感谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-19
    • 1970-01-01
    • 2011-01-03
    • 2012-10-25
    • 2021-10-31
    相关资源
    最近更新 更多