How can I trigger a hover on a marker (currently working) when I'm
hovering on the elements (divs) below the map?
Some code:
//the very simplified code below is called in a for - in the end I'll
have ten markers and ten divs below the map
var marker = new google.maps.Marker({
position: marker_obj.latlng,
icon: image,
map: map,
tooltip: marker_obj.name,
marker_id: marker_obj.id
});
markers.push(marker);
jQuery("<div/>", {
id: "markers_txt_"+marker_id,
html: 'some_text'
}).appendTo("#markers_txt_list").hover(function(){
// I guess I have to trigger the mouseover on the marker here
}, function() {
// and mouseout here
});
Thank you!!
google.maps.event.trigger(marker, 'mouseover');
Like in this example: