2010-02-12 35 views
1

我的应用程序正常工作,我使用地理编码器类检索位置纬度和longtude地理编码类没有在安卓

我的代码是:

addressInput = street+","+city+","+pin+","+country; 
List<Address> foundAdresses = gc.getFromLocationName(addressInput, 5); 

第一次抛出异常喜欢这个

java.io.IOException的:无法解析从服务器

ERROR/ProtoRequestLis响应特纳(566):com.google.common.async.WatchdogException

普莱舍解决它,如果您有任何代码检索位置的经度和纬度送我

回答

5

这应该解决您的问题。

List<Address> addresses = 
      new Geocoder(this,Locale.getDefault()).getFromLocation(lat, lon, 1); 
+0

不工作在我的情况下...... :( – Noman 2012-07-25 19:37:24