5
votes

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?

1
I have the same problem, have you found the solution?silvia zulinka
Could you show the rest of your code, where is 'GOOGLE_API_KEY' declared?LondonMassive

1 Answers

0
votes

I solve this problem by changing the google API key.