There is a way to specified `fields` using usePlacesAutocompleteService?
See original GitHub issueI’m using usePlacesAutocompleteService and I wanna specified fields
to return in predictions. Is it possible? Or even use the getDetails
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (7 by maintainers)
Top Results From Across the Web
Places Autocomplete Service | Maps JavaScript API
Stay organized with collections Save and categorize content based on your preferences. Dismiss Got it.
Read more >How to Use Places Autocomplete Google API - W3docs
The service can be used to provide an autocomplete functionality for text-based geographic searches by returning places such as businesses, addresses and points ......
Read more >wellyshen/use-places-autocomplete: React hook for ... - GitHub
I just show you how does it work via the minimal example. However you can build a UX rich autocomplete component, like WAI-ARIA...
Read more >Google Places Autocomplete Force Selection - Stack Overflow
Every time a location is picked from the Auto complete list, we populate some hidden fields with some fields coming from the JSON...
Read more >Integrating Google Places Autocomplete API in a React App
Let's see how to use one of the libraries provided by the Google Maps ... the Places Autocomplete instance and bind it to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@narcello @adybuciuman hey guys! If the
usePlacesAutocompleteService
returnsplacesService
which you can call at any place in your component will that help you to solve your cases? for exampleor you can call this line when user selects a location from your autocomplete
onClick={() => placesService. getDetails({ placeId: el.place_id, fields: ['geometry.location'] })}
. In this case you can use an autocomplete session feature and only pay for a single session.Let me know if there’s any other way you’d prefer it to be. Thanks!
@ErrorPro Don’t worry, it’s working 😃 thank you again 🎉