Google maps open info window by default?

If you want to show the info window opened by default without click, just add a new code like bellow:

Your code:

google.maps.event.addListener(marker, 'click', function() {
        infowindow.open(map,marker);
});

So we have a new code like this:

google.maps.event.addListener(marker, 'click', function() {
   infowindow.open(map,marker);
});

infowindow.open(map,marker);

As you can see, we just add a little line code with infowindow.open(map,marker);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)