有没有办法让谷歌地图标记位于信息框之上?
似乎找不到解决办法...
是的,你可以用颜色制作透明InfoBubble
的 s 。rgba
这可能是最简单的解决方法。内容是任何 HTML 字符串,因此您应该能够应用 CSS 样式,如示例中所示。
infoBubble2 = new InfoBubble({
map: map,
content: '<div class="phoneytext">Some label</div>',
...
InfoBubble 页面: http: //google-maps-utility-library-v3.googlecode.com/svn/trunk/infobubble/examples/example.html ?compiled
我的演示 http://www.tinabama.com/googlemaps/1.html
infoBubble2 = new InfoBubble({
map: map,
content: 'some text<br>more text<br><br>more more text',
position: new google.maps.LatLng(44.2, -74),
shadowStyle: 1,
padding: 0,
backgroundColor: 'rgba(57,57,57,0.3)',
borderRadius: 4,
arrowSize: 10,
borderWidth: 1,
borderColor: '#2c2c2c',
disableAutoPan: true,
hideCloseButton: true,
arrowPosition: 30,
backgroundClassName: 'phoney',
arrowStyle: 2
});
infoBubble2.open();