我有以下功能使用GInfoWindowTab在google地图上显示带有标签的infowindow,默认的infowindow显示有两个标签,我的问题是如何更改infowindow的大小,背景颜色和样式,我可以添加视频进入infowindow的一个标签。
function createMarker(point, name, address, imagepath) {
var marker = new GMarker(point, gicons[imagepath]);
var html1 = '<span class="name-tab"><b>' + name + '</b></span> <span class="info"><br/>' + address + '</span>';
var content = '<img width="100" Height="100" src="http://www.visitingdc.com/images/golden-gate-bridge-picture.jpg" />';
GEvent.addListener(marker, 'click', function() {
var infoTabs = [new GInfoWindowTab("Address", html1), new GInfoWindowTab("Images", content)];
marker.openInfoWindowTabsHtml(infoTabs);
});
答案 0 :(得分:1)
尝试
<div id="infoWin" style:"background-color:#000 ;...." > content </div>
或使用css / style.css中的类
关于标签中的视频,是的,您可以嵌入视频链接
google.maps.event.addListener(marker, "click", function(){
bubble = new google.maps.InfoWindow({
content: '<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/UmFjNiiVk9w?fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/UmFjNiiVk9w?fs=1" type="application/x-shockwave-flash" width="425" height="344" allowscriptaccess="always" allowfullscreen="true"></embed></object>'
})
bubble.open(map, marker);
})