Typescript Error Cannot find name 'google'

You should use a Service to load the Maps API.

See:

Also see:

For example:

import {} from '@types/googlemaps';

...

  public ngOnInit() {

    this.mapsApiLoaderService.load().then(res => {
      this.loadMap();
    });
  }

  private loadMap() {

    const opts: google.maps.MapOptions = {
      ...
      center: new google.maps.LatLng(this.currentPosition.latitude, this.currentPosition.longitude),
      ...
    };

    ...
  }