Open rochacbruno opened 8 years ago
Add option to show infobox on hover and persist on click.
Example
if (item["infobox"]) { (function(_infobox, _map, _marker){ _marker.infoWindow = new google.maps.InfoWindow({ content: _infobox }); _marker.addListener('click', function() { _marker.infoWindow.open(_map, _marker); _marker["persist"] = true; }); google.maps.event.addListener(_marker.infoWindow,'closeclick',function(){ _marker["persist"] = null; }); _marker.addListener('mouseover', function() { _marker.infoWindow.open(_map, _marker); }); _marker.addListener('mouseout', function() { if (!_marker["persist"]) { _marker.infoWindow.close(); } }); })(item["infobox"], map, marker); }
Add option to show infobox on hover and persist on click.
Example