Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Place Autocomplete API not returning latest city name

I'm making use of google's Place Autocomplete API to get list of cities, https://developers.google.com/places/web-service/autocomplete.

Problem is when I search "Bombay", it should return the new city name "Mumbai". Same for "Calcutta" instead "Kolkata" and "Madras" to "Chennai".

Google Place Search api returns all the right renamed city names but unfortunately it's not for autocomplete use.

like image 940
Teo Choong Ping Avatar asked Oct 31 '22 00:10

Teo Choong Ping


1 Answers

In Text search API you will get new names : https://maps.googleapis.com/maps/api/place/autocomplete/json?key=YOUR_KEY&types=city&query=Bombay

So If you can use above API you can use.

In autocomplete add types=(cities) but it returning old names only, I think google data is not updated.

https://maps.googleapis.com/maps/api/place/autocomplete/json?key=YOUR_KEY&types=(cities)&input=Bombay

like image 94
Naveen Kumar M Avatar answered Nov 08 '22 06:11

Naveen Kumar M