I want to display some animation on infoWindow in google maps with jQuery.
var infoWindow = new google.maps.InfoWindow({
content: contentString
});
google.maps.event.addListener(marker, 'click', function(){
infoWindow.open(map, marker);
setTimeout(animation, 1000);
});
animation()
has to get element by its id on infoWindow, so the infoWindow must finish loading before animation()
is executed.
How can I execute animation()
immediately afer infoWindow finish loading instead of waiting 1 second every time?
infoWindow = new google.maps.InfoWindow();
google.maps.event.addListener(infoWindow, 'domready', function() {
//do something
});
if(infowindow.getMap()){// TODO:}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.