4

我正在使用谷歌地图InfoBubble。除了close()函数,一切都很好。以前我用InfoWindows,它在那里工作。Google Maps API - InfoBubble不会关闭 - close()不起作用

顺便说一句,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(); 

任何想法?

感谢,

罗恩

回答

3

如何infoBubble.setMap(null)

+0

没办法!它的工作原理 - 谢谢,男人:) – Ron

+0

你的意思是我的解决方案工作与否? – Cdeez

+0

当然你的解决方案......有趣的是,在infobubble源代码中,他们使用'close()'... – Ron

相关问题