As I am new to Ionic 2 so having an issue in ng2-maps. Code on html side:
<ng2-map zoom="13">
<marker id="{{site.id}}" *ngFor="let site of sites" [position]="[site.latitude, site.longitude]" (click)="openInfoWindow($event)"></marker>
<info-window id="iw">
Site Name
</info-window>
and on typescript side
openInfoWindow(event) : void {
var marker = event.target;
marker.nguiMapComponent.openInfoWindow('iw', marker, {
lat: marker.getPosition().lat(),
lng: marker.getPosition().lng(),
});
}
now I am trying to customise info window but its not opening and showing an error:
Cannot read property 'openInfoWindow' of undefined
Any kind of help will be appreciated