Angular2 how to hide infoWindow when other gets opened
<p>I have an infoWindow overlay which I create to append a div to the parent of a google maps class.</p>

<p>Now I want to close it when an other infoWindow get opened, what I have tried is this:</p>

<pre><code>lastClicked: SebmGoogleMapInfoWindow;
if (this.lastClicked){
    console.log(this.lastClicked);
    this.lastClicked.close();
}
</code></pre>

<p>But in this discussion <a href="https://stackoverflow.com/questions/37486673/angular2-hide-infowindow">HERE</a> you see it was not working than I came up with an hacky solution like this:</p>

<pre><code>$('.gm-style-iw').next('div').find('img').click();
</code></pre>

<p>But is there a possible way to close the current opened infoWindow when an other gets opened</p>

<p>Here a <a href="https://plnkr.co/edit/xIccop?p=preview" rel="nofollow noreferrer">PLUNKER</a></p>