In my Android app, a user can enter an address to set their location. For this, I use the Geocoder method and getFromLocationName.
Everything works fine when I search for major cities, but as soon as I search for an ambiguous place, for example, Villefranche in France (more than 10 cities called Villefranche in France), GeoCoder returns only 1 result.
This is how I call the method:
resultReverseGeo = geoCoder.getFromLocationName(name, 5);
Log.d(TAG, "Size " + resultReverseGeo.size()); // size is always = 1
Any idea?
source
share