Open loixiyo opened 6 months ago
Hi @loixiyo,
I faced the same issue, you can try adding apiKey={} property to the
<Autocomplete apiKey={API_KEY} style={{ width: "90%" }} options = {{ types: ['point_of_interest'], fields: ["name", "formatted_address", "geometry", "place_id"], componentRestrictions: { country: "es" } }} onPlaceSelected={(place) => { console.log(place); }} />
This fixed my issue.
Hi,
I have copy-pasted the code and the autocomplete service seems to be working. But the funcion onPlaceSelected is not being executed. Could you please help me? This is the code I'm using:
<Autocomplete style={{ width: "90%" }} options = {{ types: ['point_of_interest'], fields: ["name", "formatted_address", "geometry", "place_id"], componentRestrictions: { country: "es" } }} onPlaceSelected={(place) => { console.log(place); }} />
Thanks!