Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 640 Bytes

File metadata and controls

36 lines (27 loc) · 640 Bytes

marker.hideInfoWindow()

Hide the infoWindow of the marker.

<div id="map_canvas"></div>
var div = document.getElementById("map_canvas");
var map = plugin.google.maps.Map.getMap(div);
map.one(plugin.google.maps.event.MAP_READY, function() {

  map.addMarker({
    'position': {
      lat: 0,
      lng: 0
    },
    'title': "Click me!"
  }, function(marker) {

    // Show the infoWindow
    marker.showInfoWindow();

    // Catch the MARKER_CLICK event
    marker.on(plugin.google.maps.event.INFO_CLICK, function() {

      // Hide the infoWindow
      marker.hideInfoWindow();

    });
  });
});