/ / mouse event of infowindow na google map api - google-maps-api-3

evento de mouse de infowindow no google map api - google-maps-api-3

Existe algum evento de mouse no infowindow do googlemap api v3. Como o evento closeclick. Na verdade, estou fechando a janela de informações após 3 segundos. mas eu quero que se o ponteiro do mouse é mais infowindow, então não deve ser perto plesae me dar exemplo para fazê-lo .. Muito obrigado.

Meu Código está escrito como segue ---

function generateMarkers(locations, is_paid)
{ var marker; for (var i = 0; i < locations.length; i++)
{
var marker;
for (var i = 0; i < locations.length; i++) {

createMarker(new google.maps.LatLng(locations[i][0], locations[i][1]), locations[i][2], locations[i][3], locations[i][4], is_paid);
}
}

function createMarker(pos, name, town, image, is_paid) {
var infowindow;

var marker = new google.maps.Marker({
position: pos,
map: map,  // google.maps.Map
title: name,
icon: "images/red.png"

});
infowindow = new google.maps.InfoWindow
({
content: "<div id="dvContent" onmouseover="clearTime()" onmouseout="clearwindow()"><div style="color:black;float:left"><img src="/images/" + image + "" width="50px" height="50px"/></div><div style="color:black;margin-left:60px">" + name + "<br>Address:" + town + "<br><a href="#" target="_blank" style="color:blue">www.somethingcupid.com</a></div></div>"


});

google.maps.event.addListener(marker, "mouseover", function () {
if (is_paid != "True") {

document.getElementById("divPopup").style.display = "block";
}
else {

infowindow.open(map, marker);


}

});



google.maps.event.addListener(marker, "mouseout", function () {
if (is_paid != "True") {

document.getElementById("divPopup").style.display = "block";
}
else {

t = setTimeout(function () { infowindow.close() }, 3000);

}

});
}

function clearTime() {
clearTimeout(t);
}enter code here

function clearwindow() {
setTimeout(function () { infowindow.close() }, 3000);
}

Respostas:

0 para resposta № 1

O único Evento InfoWindow relevante para a atividade do mouse é closeclick.

O que você pode fazer é usar um <div> dentro do conteúdo InfoWindow e use seus eventos de mouse. (Haverá uma borda inativa ao redor da área ativa.)