Java 如何获得;什么';“在这儿吗?”;来自经纬度的信息?

Java 如何获得;什么';“在这儿吗?”;来自经纬度的信息?,java,android,google-maps,google-maps-android-api-2,Java,Android,Google Maps,Google Maps Android Api 2,有一个选项可以在浏览器中的谷歌地图上单击鼠标右键,然后选择“What's here?”。结果要么是街道地址,要么是郊区等。有可能在Android Google Maps API V2中实现类似的功能吗?将结果作为标题添加到标记会很酷。谢谢,基本上是“What's here”返回与特定纬度和经度相关的详细地址。因此,您可以使用下面的代码,是的,将结果添加到InfoWindowAdapter是很好的 Geocoder geocoder; List<Address> addresses;

有一个选项可以在浏览器中的谷歌地图上单击鼠标右键,然后选择“What's here?”。结果要么是街道地址,要么是郊区等。有可能在Android Google Maps API V2中实现类似的功能吗?将结果作为标题添加到标记会很酷。谢谢,基本上是“What's here”返回与特定纬度和经度相关的详细地址。因此,您可以使用下面的代码,是的,将结果添加到InfoWindowAdapter是很好的

Geocoder geocoder;
List<Address> addresses;
geocoder = new Geocoder(this, Locale.getDefault());
addresses = geocoder.getFromLocation(latitude, longitude, 1);

String address = addresses.get(0).getAddressLine(0);
String city = addresses.get(0).getAddressLine(1);
String country = addresses.get(0).getAddressLine(2);
Geocoder-Geocoder;
列出地址;
geocoder=新的geocoder(这个,Locale.getDefault());
地址=地理编码器.getFromLocation(纬度,经度,1);
字符串地址=地址.get(0).getAddressLine(0);
字符串city=addresses.get(0).getAddressLine(1);
字符串country=addresses.get(0).getAddressLine(2);

您是在寻找地址还是附近的兴趣点?对于后者,请参见GooglePlacesAPI。