我正在尝试转换为 API v2 编写的以下代码
<!--- Add position and date information --->
var trackIcon = new GIcon({image:"/images/www2/icons/map_track_marker.png"});
trackIcon.iconSize = new GSize(6,6);
trackIcon.iconAnchor = new GPoint(3,3);
for (var i=0; i<trackArray.length;i++)
{
map.addOverlay(new GMarker(trackArray[i],{title:trackArrayInfo[i],icon:trackIcon}));
}
到V3,但没有成功。这是我不成功的尝试:
<!--- Add position and date information --->
var trackIcon = new google.maps.Icon({image:"/images/www2/icons/map_track_marker.png"});
trackIcon.iconSize = new google.maps.Size(6,6);
trackIcon.iconAnchor = new google.maps.Point(3,3);
for (var i=0; i<trackArray.length;i++)
{
new google.maps.Marker(trackArray[i], {title:trackArrayInfo[i],icon:trackIcon}).setMap(map);
}
有人可以帮我吗?我越来越绝望了:(