Geocoder geocoder = new Geocoder(this);
try {
List<Address> r = geocoder.getFromLocationName("서울시청", 1);
double lat = r.get(0).getLatitude();
double lng = r.get(0).getLongitude();
Log.d("@@", "위도 : " + lat + ", 경도 : " + lng);
} catch (Exception e) {
Log.d("@@", "주소변환 실패");
}'android' 카테고리의 다른 글
| 구글맵 화면에 보이는 범위 위도 경도 (0) | 2020.03.05 |
|---|---|
| FCM(Firebase Cloud Messaging) 설정하기 (0) | 2020.03.04 |
| 가로세로 전환시 새로고침 안되게 유지 (0) | 2020.02.21 |
| YouTube API 플레이어 (0) | 2020.02.19 |
| YouTube 썸네일(Thumbnail) (0) | 2020.02.19 |