angular2-google-maps标记点击事件

Sir*_*ini 7 typescript angular

有人熟悉这个库吗?:https://angular-maps.com/ 如果是这样,有人可以帮助我在标记上创建点击事件我试过这个:

 <sebm-google-map-marker *ngFor="#location of locations" (click)="updateDiv()"
[latitude]="location.lat" [longitude]="location.lng" [label]="location.id">

updateDiv() {
console.log('check');
}
Run Code Online (Sandbox Code Playgroud)

但似乎不起作用?我究竟做错了什么?

Thi*_*ier 14

我认为您可以尝试以下(markerClick事件而不是click一个):

<sebm-google-map-marker *ngFor="#location of locations"   
  (markerClick)="updateDiv()" [latitude]="location.lat"
  [longitude]="location.lng" [label]="location.id">

updateDiv() {
  console.log('check');
}
Run Code Online (Sandbox Code Playgroud)

请在"输出"部分中查看此文档: