-1
此代碼工作,但當我點擊每個標記時,標記不動畫反彈。谷歌地圖標記動畫不是woking
for(i=0; i<locations.length; i++) {
var position = new google.maps.LatLng(locations[i][2], locations[i][3]);
var marker = new google.maps.Marker({
position: position,
map: map,
icon: new google.maps.MarkerImage(locations[i][5]),
animation: google.maps.Animation.DROP
});
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infowindow.setContent(locations[i][1]);
infowindow.setOptions({maxWidth: 500});
infowindow.open(map, marker);
}
animation: google.maps.Animation.BOUNCE
}) (marker, i));
Markers[locations[i][4]] = marker;
}
爲什麼你會指望它反彈?您不會將BOUNCE動畫添加到標記。我希望你得到了該代碼的JavaScript錯誤。 – geocodezip 2014-09-21 06:53:42