coder = new Geocoder(this);
try {
String locationName ="Gulshan 1";
List<Address> addressList = coder.getFromLocationName(
locationName, 5);
if (addressList != null && addressList.size() > 0) {
destLat = (int) (addressList.get(0).getLatitude() * 1e6);
destLon = (int) (addressList.get(0).getLongitude() * 1e6);
TextView pozycja = (TextView) findViewById(R.id.position);
pozycja.setText("lat: "
+ addressList.get(0).getLatitude() + " lng: "
+ addressList.get(0).getLongitude());
}
}
catch (Exception e) {
Log.e("error", e.getMessage().toString());
}
코드 시도하는 모든 주소를 입력 내 Google지도를 구현해야
?
당신이 얻을 무엇을 기술 해주십시오 : 등 "아무것도", 쓰레기, 오류 메시지, – Irfy
를 그것은 "0.0, 0.0을 찾을 수 없습니다"이 표시 :( –