Reputation: 2664
I don't understand how Geocoding request should be formulated to always return an expected result.
I try to know all cities of Apremont in France for example. So I send the request:
https://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=Apremont,fr
But it only returns an apremont in Vendée, 85.
Now, if I send the following request,
https://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=Apremont,fr,26
it effectively find all Apremont in France (26, 73, 85, etc...), and more but here is not the subject.
So, how to format the request to ask geocoding to returns all cities of Apremont?
Regards,
Upvotes: 1
Views: 131
Reputation: 3288
You can use this to find out latitude and longitude of particular adress
@"http://maps.googleapis.com/maps/api/geocode/json?address=%@&sensor=true"
Send that latitude and longitude to
@"http://maps.googleapis.com/maps/api/geocode/json?latlng=%f,%f&sensor=false"
and you will be able to get multiple location near by that particular latitude and longitude
Upvotes: 1