我正在尝试添加MarkerOptions中指定标签的标记,但我从未在图标中看到标签。我知道有一个MarkerWithLabel类,但对于我的目的,标准标签就足够了,这就是文档描述它的方式......
vGeocoder.geocode( { 'address': vStart}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
vStartMarker = new google.maps.Marker({
map: vMap,
position: results[0].geometry.location,
label: 'A',
icon: "http://maps.google.com/mapfiles/ms/icons/yellow-dot.png"
});
vMap.setCenter(results[0].geometry.location);
vMap.setZoom(8);
} else { alert('Geocode was not successful for the following reason: ' + status); }
});