import { Component, Inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { GoogleMapsModule } from '@angular/google-maps' @Component({ selector: 'app-venue-map-modal', templateUrl: './venue-map-modal.component.html', styleUrls: ['./venue-map-modal.component.css'] }) export class VenueMapModalComponent { mapOptions: google.maps.MapOptions = { zoom: 14, } marker: any={} constructor(private dialogRes: MatDialogRef<VenueMapModalComponent>, @Inject(MAT_DIALOG_DATA) data: any) { this.mapOptions.center = data; this.marker.position = data; } close(){ this.dialogRes.close(); } }