When I press on Current location so i get this error

Hi @RonakPatel0
I'm also getting this error, and I didn't find a way to make it work !
But I can share to you my temporary fix:
getCurrentLocation() {
Geolocation.getCurrentPosition(({ coords }) => {
console.log(coords);
fetch('https://maps.googleapis.com/maps/api/geocode/json?address=' + coords.latitude + ',' + coords.longitude + '&key=' + myKey)
.then((response) => {
response.json().then((json) => {
console.log(json.results[0]);
this.setState({
currentPosition: {
data: json.results[0],
details: json.results[0],
description: "current location",
}
})
});
})
})
}
and then user "predefinedPlaces" props
const GooglePlacesInput = () => {
return (
<GooglePlacesAutocomplete
// [...]
predefinedPlaces={[this.state.currentPosition]}
// [...]
/>
);
}
Most helpful comment
Hi @RonakPatel0
I'm also getting this error, and I didn't find a way to make it work !
But I can share to you my temporary fix:
and then user "predefinedPlaces" props