Я пытаюсь console.log событий, которые я получаю, когда нажимаю на кластер маркеров, но не получаю ответа и ошибок в консоли.
Я использую метод getMarkers (найденоиз интерфейса MarkerCluster).
cluster.model.ts
export interface MarkerClustererInstance {
getMarkers(): Marker[];
}
html
<agm-marker-cluster #markerCluster (click)="findMarkers()" imagePath="https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/markerclustererplus/images/m">
ts
import { MarkerClustererInstance } from '../../models/cluster.model';
@ViewChild('markerCluster') public markerCluster: MarkerClustererInstance;
findMarkers() {
console.log(this.markerCluster.getMarkers());
}