Maps関連API
GeoCoder
LatLng latLng = mMap.getCameraPosition().target;
double lat = latLng.latitude;
double lon = latLng.longitude;
Geocoder mGeocoder = new Geocoder(this, Locale.getDefault());
StringBuffer sb = new StringBuffer();
List<Address> addresses;
try {
addresses = mGeocoder.getFromLocation(lat, lon, 1);
for (Address address : addresses) {
int maxSize = address.getMaxAddressLineIndex();
for (int i = 0; i <= maxSize; i++) {
sb.append(address.getAddressLine(i));
}
}
} catch (IOException e) {
e.printStackTrace();
} catch (IllegalArgumentException e) {
e.printStackTrace();
}
Toast.makeText(this,
"lat:" + lat + " lon:" + lon + " address:" + sb,
Toast.LENGTH_LONG).show();
他のAPI
https://developers.google.com/maps/