Answer the question
In order to leave comments, you need to log in
How to get address information in Yandex Map android?
I am using Yandex map 3.0.0 in my android project. I want to get a house, place information from the user's location
Answer the question
In order to leave comments, you need to log in
If you use yandex map kit, then here's an example for you, how to get a city with coordinates (longitude and latitude)
private String getCity() {
Geocoder geocoder = new Geocoder(this, Locale.getDefault());
try {
List<Address> addresses = geocoder.getFromLocation(latitude, longitude, 1);
if (addresses != null) {
Address returnedAddress = addresses.get(0);
city = returnedAddress.getAdminArea().toString();
} else {
city = "Error";
}
} catch (IOException e) {
e.printStackTrace();
city = "Error";
}
return city;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question