I am getting this error when getting address using Geocoder in react native:
Object { "code": 4, "message": "Error from the server while geocoding. The received datas are in the error's 'origin' field. Check it for more informations.", "origin": Object { "results": Array [], "status": "ZERO_RESULTS", }, }
I am using "react-native-geocoding" dependency
My code include in here:
Geocoder.init(GOOGLE_API_KEY); //google api key
Geocoder.from(latitude,longitude)
.then(json => {
var addressComponent = json.results[0].address_components;
console.log(JSON.stringify(addressComponent));
})
.catch(error => console.warn(error));
Need some help?