public String ConvertPointToLocation(GeoPoint gp) {
String address = "";
Geocoder geoCoder = new Geocoder(this, Locale.getDefault());
try {
List<Address> addresses = geoCoder.getFromLocation(
(gp.getLatitudeE6()/1E6),(gp.getLongitudeE6()/1E6), 1);
if (addresses.size() != 0) {
for (int index = 0; index < addresses.get(0)
.getMaxAddressLineIndex(); index++)
address += addresses.get(0).getAddressLine(index) + " ";
}
} catch (IOException e) {
}
return address;
}
Thank you!
ReplyDelete