我如何在不同事件上更改标记或标记图像的大小,但标记放置在页面加载上唯一的事情就是更改大小
function onload(){
var location = new google.maps.LatLng(latt, lngg);
img = new google.maps.MarkerImage('../Images/' + imgN, null, null, null, new google.maps.Size(30, 40));
marker = new google.maps.Marker({
position: location,
id: poiId,
animation: google.maps.Animation.DROP,
draggable: false,
icon: img,
html: hml,
map: map,
draggable:true
});
}
下面两行我用来改变标记图像的 zie
var iconIm = new google.maps.MarkerImage('../Images/imagesPink.png', null, null, null, new google.maps.Size(70, 90));
marker.icon = iconIm;