How to find out that infowindow has already appeared on google maps

I want to display some animation on infoWindow on google maps using jQuery.

var infoWindow = new google.maps.InfoWindow({ content: contentString }); google.maps.event.addListener(marker, 'click', function(){ infoWindow.open(map, marker); setTimeout(animation, 1000); }); 

animation() must receive the element by its id on infoWindow, so infoWindow must complete the download before animation() executed.

How can I execute animation() immediately afer infoWindow to complete the download, and not wait 1 second each time?

+6
source share
2 answers
 infoWindow = new google.maps.InfoWindow(); google.maps.event.addListener(infoWindow, 'domready', function() { //do something }); 
+14
source

if (infowindow.getMap ()) {// TODO:}

0
source

Source: https://habr.com/ru/post/909806/


All Articles