google-maps-services-js icon indicating copy to clipboard operation
google-maps-services-js copied to clipboard

Autocomplete prediction type fields should be optional

Open samruston opened this issue 1 year ago • 1 comments

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.

samruston avatar Dec 06 '23 12:12 samruston

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:

This is an automated message, feel free to ignore.

wangela avatar Dec 06 '23 12:12 wangela