Converting from agm/core to @angular/google-maps missing Maploader api

202 views Asked by At

In my angular project I am trying to remove @agm/core and using @angular/google-maps instead. It is going good so far. In @agm/core we had a MapsAPILoader and what I was able to do was this

this.mapsLoader.load().then(() => {
       const autocomplete = new google.maps.places.Autocomplete(this.searchElementRef?.nativeElement, {
         types: ['geocode'],
       });

       autocomplete.addListener('place_changed', () => {
         this.zone.run(() => {
           const place: google.maps.places.PlaceResult = autocomplete.getPlace();
         });
       });
     });
0

There are 0 answers