How to open snazzy info window programmatically?
See original GitHub issueIssue description I want to open snazzy window from parent component. _openInfoWindow is protected, so I am not able to call it from my component. Maybe I am doing it wrong. I want to open the window of first marker
Steps to reproduce and a minimal demo of the problem
<agm-map (mapReady)="mapReady()" [latitude]="lat" [longitude]="lng" [zoom]="zoom">
<agm-marker *ngFor="let m of markers; let i = index" [latitude]="m.latitude" [longitude]="m.longitude" [label]="m.label">
<agm-snazzy-info-window [closeWhenOthersOpen]="true" [placement]="'bottom'" [maxWidth]="400" #infoWindow>
<ng-template>
My first Snazzy Info Window!
</ng-template>
</agm-snazzy-info-window>
</agm-marker>
</agm-map>
class MyComponent{
@ViewChildren("infoWindow") infoWindowComponents;
mapReady() {
let infoWindows: AgmSnazzyInfoWindow[] = this.infoWindowComponents._results;
//Want to open the info window of 0th window
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
How to open snazzy info window programmatically? #1203
I want to open snazzy window from parent component. _openInfoWindow is protected, so I am not able to call it from my component....
Read more >How to open/close a snazzy-info-window ... - Stack Overflow
Show activity on this post. You can indeed use the isOpen attribute to dynamically open/close the Snazzy info window. Save this answer. Show ......
Read more >How to open/close a snazzy-info-window programmatically in ...
Coding example for the question How to open/close a snazzy-info-window programmatically in angular-google-maps?-Googlemaps.
Read more >Angular (forked) - StackBlitz
open -close-a-snazzy-info-window-programmatically-in-angular-google-maps.
Read more >Styled Info Windows with Snazzy Info Window & Angular ...
This creates a basic styled info window that opens when the user clicks on the marker and closes when another snazzy info window...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is what I did:
In the component class:
In template:
@calbear47 the thing is that _openInfoWindow() method is declare as protect . so i can not use that method.