开发者

Geocoder class is not working properly in android

My application I'm using Geocoder class for retrieve the location latitude and longtude

My code is :

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

First time it is throwing exception like this

java.io.IOException:Unable to parse response from server

ERROR/ProtoRequestListener(566): com.google.common.async.WatchdogException

Plese resolve it and if you have any code retrieve the location latitude and longitude send me


This should solve your problem.

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜