user5331648
user5331648

Reputation:

set infowindow while mouseover not in marker

I'm new to google map. I set infowindow for 8 latlong points, while mouseover on the marker.

I split my page, 70% for map and 30% for html page.

I set 8 div and 8 markers respectively

Is there anyway to set up Infowindow, while mouseover in respective html div?

Upvotes: 0

Views: 44

Answers (1)

davidkonrad
davidkonrad

Reputation: 85528

Very easy. If you have a <div id="html-div">HTML div</div> you want to associate with a certain infowindow and marker, then :

document.getElementById('html-div').onmouseover = function() {
   infowindow.open(map, marker);
}
document.getElementById('html-div').onmouseleave = function() {
   infowindow.close();
}

demo -> http://jsfiddle.net/6cf0760k/

Upvotes: 2

Related Questions