I have a project using Google maps api v3, and I use google.maps.event.triggerto call or launch the listener that is created when the map loads. In this case, I install the listener when I click on the polygon, so when I click on the polygon, the corresponding window opens and is google.maps.event.triggerinstalled on another function block in the same javascript file. It works well when the entire web program restarts. But when I reload the map, or the map is reinitialized with a polygon with the same variable object, the syntax google.maps.event.triggerdoes not start. This is my function that usesgoogle.maps.event.trigger
function callInfoPoly(nomor){
alert(polygon[nomor].getPath().getAt(0));
google.maps.event.trigger(polygon[nomor], "click");
}
the warning works well, this means that the variable contains a polygon object, but google.maps.event.triggerdoes not start.
source
share