Google places and geocode do not return full list of results

I am doing cartographic work and need to find the latitude and longitude of villages in India, many of which are small and rural. I am having trouble finding the full set of places with the same name, for example a village named "Kallanai" (see below for the api links, note that they need the appropriate keys for the places API to run on your machine). I can find the one I'm looking for on google maps by typing www.google.co.in/maps/place/Kallanai into the browser, however it won't show up in the geocoder or place the api without specifying the associated pin (similar to the zip code ). Can anyone explain why basic geocode searches or API locations using only the village name are not returning the village with pincode 625501 in the results?

eg.

Google:

https://maps.googleapis.com/maps/api/place/textsearch/json?query=kallanai&sensor=false&key=enter your key

https://maps.googleapis.com/maps/api/place/textsearch/json?query=kallanai+625501&sensor=false&key=enter your key

will post google geocoding links further as stackoverflow won't let me include more than two links in my post without additional dots.

+3


source to share


1 answer


In a world where autocomplete is common and almost taken for granted, Google Maps has a (long) jump to showing only the one result it is most likely looking for.

The autocomplete API locations might give you more of what you are looking for, but it will still not be optimal for the database - queries like this. It works best when you type users, each of whom knows which Kallanai they want, so they can select the offer that matches, and they can add details (like a PIN) to get it if the offer doesn't appear at the beginning (max. 5 sentences are shown each time).



Google makes geocoding differently from classic GIS databases. To get all the cities [with a given name] in a given country, you probably need a database like GeoNames or Natural Earth .

+2


source







All Articles