add alt tag inside of infowindow for google maps v3 javascript

868 views Asked by At

I have an application in which i draw items on a google map. In doing so, i have multiple markers with defined infowindows for each. Inside the infowindow, i would like to display an image (this works). Associated to that image i would like an ALT tag associated on scroll over. This however, does not seem to work when used as seen in my example code below. Does anyone have any reason/ideas here to assist?

var contentString = '<div id="content">' +
                        '<b>Device Name</b>: ' + devicesArray[value][1] + '<br>' +
                        '<b>Type:</b> ' + devicesArray[value][3] + '<br>' +
                        '<b>IP  :</b> ' + devicesArray[value][8] + '<br>' +
                        '<b>Availabiliy:</b> <img src="images/OrbGreenUp.png" alt="tag">' + devicesArray[value][9] + '%<br>' +
                        '<b>Events: </b><img src="images/BoxGreenEvent.png" alt="tag2">' + devicesArray[value][10] + '%<br>' +
                        '</div>';
      infowindow = new google.maps.InfoWindow({
        content:contentString
      });

So when i scroll over the image, nothing at all happens. Thanks in advance.

1

There are 1 answers

0
Dr.Molle On

When you want to see a tooltip while hovering the image you should set the title-attribute instead of alt