[問題] geocoder
小弟想要用Geocoder把經緯度轉成地址
可是使用geocoder.getFromLocation時每次都會跑出ERROR
請問是哪裡寫錯了嗎?
還是有什麼除了Internet以外的Permission
public String getAddress(){
Geocoder gc = new Geocoder(this, Locale.ENGLISH);
String place=null;
try {
List<Address> lstAddress = gc.getFromLocation(longitude, latitude,1);
place = lstAddress.get(0).getLocality();
} catch (IOException e) {
}
return place;
}
感謝~
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.133.36.13
※ 文章網址: https://www.ptt.cc/bbs/AndroidDev/M.1426922071.A.2D6.html
→
03/21 22:06, , 1F
03/21 22:06, 1F
→
03/22 17:43, , 2F
03/22 17:43, 2F
推
03/23 09:08, , 3F
03/23 09:08, 3F
→
03/23 15:24, , 4F
03/23 15:24, 4F
→
03/23 15:24, , 5F
03/23 15:24, 5F
→
03/23 15:27, , 6F
03/23 15:27, 6F