Ho un'immagine che voglio aggiungere a un marker, stagleton.png, e ho una funzione per creare un marker. Come cambio il metodo InfoWindow in modo che l'immagine venga visualizzata anche con il testo in InfoWindow?Come aggiungere un'immagine a InfoWindow dell'indicatore in google maps v3?
function createMarker(name, latlng, mapsent)
{
var marker = new google.maps.Marker({
position: latlng,
map: mapsent,
title: name
});
marker.info = new google.maps.InfoWindow({
//when I add <IMG BORDER="0" ALIGN="Left" SRC="stagleton.jpg"> the maps will not load
content: <IMG BORDER="0" ALIGN="Left" SRC="stagleton.jpg"> "My name is " + name
});
google.maps.event.addListener(marker, 'click', function(){
marker.info.open(mapsent, marker);
});
return marker;
}
Controlla la mia risposta, hai eseguito il test in IE? – SeanKendle