diff --git a/packages/core/directives/marker.ts b/packages/core/directives/marker.ts index 7da46398f..7279a85b5 100644 --- a/packages/core/directives/marker.ts +++ b/packages/core/directives/marker.ts @@ -58,6 +58,11 @@ export class AgmMarker implements OnDestroy, OnChanges, AfterContentInit { */ @Input() label: string; + /** + * Data associated with this marker + */ + @Input() data: any; + /** * If true, the marker can be dragged. Default value is false. */ @@ -203,7 +208,7 @@ export class AgmMarker implements OnDestroy, OnChanges, AfterContentInit { const mover = this._markerManager.createEventObservable('mouseover', this) .subscribe((e: mapTypes.MouseEvent) => { - this.mouseOver.emit({coords: {lat: e.latLng.lat(), lng: e.latLng.lng()}}); + this.mouseOver.emit({data: this.data, marker: this, coords: {lat: e.latLng.lat(), lng: e.latLng.lng()}}); }); this._observableSubscriptions.push(mover);