Hello, I have to search for Longitude and Latitude, by the Google API, with Angular ..
I am using this code to make the request:
constructor(private http: Http, private vwServicePagination: VwServicePagination){}
obtendoGeolocalizacao() {
return this.http.get('https://maps.googleapis.com/maps/api/geocode/json?address=09771220')
.map(response => response.json());
}
And here in OnInit I'm calling this method created above ... This way:
ngOnInit(){
const teste = this.vwServiceApi.obtendoGeolocalizacao();
console.log(this.teste);
}
However, the returned object has nothing to do with the json that is returned by the API! How do I get the JSON object returned by the API?