I'm using angular-googlemaps(agm) and it's working so far..
But I want to search an address by latitude and longitude, so I found part of the solution here... the problem is:
I followed the following steps:
1 - Installed googlemaps: yarn add @types/googlemaps -D
2 - Import googlemaps in my component: import { } from 'googlemaps';
And when I try to do anything with "google"
like this, for example:
const geocoder = new google.maps.Geocoder();
I get the following error:
ERROR ReferenceError: google is not defined
1st. attempt: Declare google
this way in my component:
declare var google: any;
2nd. attempt: Put googlemaps
inside types
in tsconfig.app.json
(angular-cli):
...
"types": ["googlemaps"]
...
But the error keeps appearing.
Am I missing something? Thanks in advance.