我正在将 Google Map 从 v2 api 移植到 v3。我当然遇到了问题。我使用 MarkerWithLabel() 创建带有标题的标记。在除 IE9 之外的所有浏览器中(即使在 IE8 中),标签都是可见的。哪里可能有问题?
这是我的带有 laber builder 功能的标记代码:
function createRegionMarker(pointData) {
var latlng = new google.maps.LatLng(pointData.lat, pointData.lng);
var image = new google.maps.MarkerImage("/images/rall.png", new google.maps.Size(40, 40), new google.maps.Point(0,0), new google.maps.Point(0, 32));
var marker = new MarkerWithLabel({
position: latlng,
icon: image,
clickable: true,
draggable: false,
map: map,
labelContent: pointData.id,
labelAnchor: new google.maps.Point(-10, 20),
labelClass: "map-labels",
labelInBackground: false
});
google.maps.event.addListener(marker, "click", function() {
zoomMarker(pointData.lng, pointData.lat, 8);
});
return marker;
}