Google Maps API标记标题
问题描述:
我正在使用Fusion Table图层来显示标记数据。用FT处理标记,我没有看到在标记上定义标题属性的方法。Google Maps API标记标题
想要做这样的事情在鼠标悬停: http://www.guardian.co.uk/travel/series/berlin-city-guide?intcmp=122
有什么想法?和http://code.google.com/apis/maps/documentation/javascript/reference.html#MarkerOptions
监护人可能这样做的方法是使用上的标记事件处理程序:
答
今天没有办法与Fusion Tables做到这一点。我建议在Google Maps API问题跟踪器上提交功能请求。
答
没有可以使用的标题,但就是喜欢上任何普通的HTML控件的title属性检查出来这里使用inforwindow这样的东西
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title:"Hello World!" // see how title is used
});
google.maps.event.addListener(marker, 'mouseover', function() {
infowindow = new google.maps.InfoWindow();
infowindow.setContent(contentString); // contentString can be html as far as i know whose style you can override
infowindow.setPosition(event.latLng);
infowindow.open(map);
});