agm map infowindow close
previous: AgmInfoWindow;
...
clickedMarker(infoWindow: AgmInfoWindow) {
if (this.previous) {
this.previous.close();
}
this.previous = infoWindow;
}
// Make the change to your event binding function in the template
<agm-marker
(markerClick)="clickedMarker(infoWindow)">
<agm-info-window #infoWindow>
</agm-info-window>
</agm-marker>