google-maps-services-js
google-maps-services-js copied to clipboard
Autocomplete prediction type fields should be optional
Hi,
The autocomplete response type currently lists types & place_id as required properties:
https://github.com/googlemaps/google-maps-services-js/blob/e6cd0e77f1f0ecbfe08062e763bbf4e5235c03dc/src/places/autocomplete.ts#L148
However according to the docs, these properties are optional: https://developers.google.com/maps/documentation/places/web-service/autocomplete#PlacesAutocompleteResponse
This caught us off guard recently as we had queries that would not return types, such as Rua ch 13. However I'm not sure under what circumstances a place_id would not be returned. However I believe the types should accurately reflect the response returned.
If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.
@samruston Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:
- Check the issue tracker - bugs and feature requests for Google Maps Platform APIs and SDKs
- Open a support case - Get 1:1 support in Cloud Console.
- Discord - chat with other developers
- StackOverflow - use the
google-mapstag
This is an automated message, feel free to ignore.