I need some help on the Google Maps API v3.
I have a map with markers (which are pictures), informations from a database. The pictures and the map are ok at this tim
According to the docs, setIcon
either takes a string or a MarkerImage
object. Initially you set a MarkerImage
, but in your listener code, you do not construct a MarkerImage
. Try something like this instead:
for(i=0; i< markers.length; i++ ) {
var icon = markers[i].getIcon();
markers[i].setIcon(new google.maps.MarkerImage(
icon.url,
new google.maps.Size(largeur, hauteur),
new google.maps.Point(0, 0),
new google.maps.Point(0, 0),
new google.maps.Size(largeur, hauteur))
);
}