mercredi 20 juin 2018

Marker popup displayed outside Google map

I'm trying to make this code by Geocodezip show only one popup at the time on the side of the map, the other(s) being hidden when not active.

I've tried to add an if..else statement to the google.maps.event.addListener for this but not working so far.

What should I do in the if..else statement to make all popups hidden unless active?

   google.maps.event.addListener(marker, 'click', function(e) {
     if ( popup.dialog('open') ) {
         popup.show();
     } else {
         popup.hide();
     }

   });

Aucun commentaire:

Enregistrer un commentaire