Skip to content

Instantly share code, notes, and snippets.

this.map.addListener('click',
// Lambdas to the rescue, it will automatically capture this
(e: google.maps.MouseEvent) => {
// Run event handler in Angular Zone, so that change detection will work
this._ngZone.run(() =>
this.mapClick.emit(e.latLng));
});