Reputation: 22
We are using google places API to autocomplete state, city or region searches. The issue is when one searches for a state, Places API gives two results one for the state and the other for the city/region. For eg, if we search Maine we get Maine, USA and Maine, ME, USA both in the response. Would anyone please provide a way to avoid this duplication?
Upvotes: -2
Views: 820
Reputation: 678
Do you use "types" parameter? https://developers.google.com/maps/documentation/places/web-service/autocomplete#types "cities" type might give the result you want.
Upvotes: 1