Google Maps Api:infowindow vs infobubble?

时间:2014-08-22 14:04:07

标签: google-maps-api-3 infowindow infobubble

我正在尝试使用google maps api v3 javascript创建一个包含多个标记的地图。我读了很多教程,我真的很困惑infowindows / infobubbles。是同一件事还是他们不同,怎么样?在我看来,它们是两个不同的东西,因为在每种情况下都会创建一个不同的对象。

var infowindow = new google.maps.InfoWindow();
var infobubble = new google.maps.InfoBubble();

有人知道更多相关信息吗?

3 个答案:

答案 0 :(得分:8)

答案 1 :(得分:2)

Infobubble是一个扩展Google地图功能的第三方库。 (这就是为什么it's found in google maps utility library

它提供了额外的样式属性(有时样式信息infowindows是一个讨厌的婊子),但反过来,谷歌不支持它,未来的谷歌地图版本可能会破坏它。

答案 2 :(得分:2)

我认为我们之间的区别只是因为infowindows是Google地图皮肤(https://developers.google.com/maps/documentation/javascript/examples/infowindow-simple?hl=FR)的基本工具提示,而且infoBubble更易于编辑,包含标签和个人皮肤(http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/examples/example.html/