【发布时间】:2017-10-03 09:44:03
【问题描述】:
我使用Angular Google Maps(AGM) 组件。
我需要在标记鼠标悬停时打开信息窗口。
如何在我的函数 onMouseOver 中检索 infowindow 实例以打开它?
<agm-map [fitBounds]="latlngBounds" [zoom]="15">
<agm-marker *ngFor="let m of markers; let i = index"
[latitude]="m.geoCode.latitude"
[longitude]="m.geoCode.longitude"
(mouseOver)="onMouseOver(m)"
>
<agm-info-window [disableAutoPan]="false">
<div>
<a (click)="onClickInfoView({id:m.id})" class="btn btn-attention pull-right">test<i class="fa fa-angle-double-right"></i></a>
</div>
</agm-info-window>
</agm-marker>
</agm-map>
onMouseOver(data) {
???? /* how to open here the info window?
}
【问题讨论】: