marlove/react-native-geocoding

Error while parsing response's body into JSON. The response is in the error's 'origin' field. Try to parse it yourself.

vijay-dadhich09 opened this issue · 0 comments

Hi I am getting this error while trying to get the address. Any soluttion

Error while parsing the response's body into JSON. The response is in the error's 'origin' field. Try to parse it yourself.

const getGeoLocation = (lat, long) => { // Geocoder.from(lat, long) Geocoder.from(37.78825, -122.4324) .then((json) => { console.log('json: ', json); const addressComponent = json.results[0].address_components[0]; console.log('addressComponent:', addressComponent); }) .catch((error) => console.log(error)); };