Answers for "agm map infowindow close"

1

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>
Posted by: Guest on November-30-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language