有没有办法让谷歌地图标记位于信息框之上?
似乎找不到解决方案...
最佳答案
是的,您可以使用 rgba
颜色制作透明的 InfoBubble
。这可能是最简单的解决方法。内容是任何 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();
关于jquery - 谷歌地图标记 z 索引在信息框顶部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12538612/