Open vijay-dadhich09 opened 3 years ago
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)); };
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)); };