标记的angular2-google-maps点击事件

问题描述:

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

Is someone familiar with this library?: https://angular-maps.com/ If so can someone help me creating a click event on the marker i tried this:

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

updateDiv() {
console.log('check');
}

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

But it seems not to work? What am I doing wrong?

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

I think that you could try the following (markerClick event instead of the click one):

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

updateDiv() {
  console.log('check');
}

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

See this doc in the Outputs section: