アプリケーションで場所を取得するために GeoCoder を使用しています。次のコードは次のとおりです。
Geocoder geoCoder = new Geocoder(this);
try {
List<Address> addresses = geoCoder.getFromLocationName("", 1);
if(null != addresses && addresses.size() > 0){
address = addresses.get(0);
List<Overlay> mapOverlay = mapView.getOverlays();
//This is new class to get address on basis on latitude and longitude
AddressOverlay addressOverlay = new AddressOverlay(address);
mapOverlay.add(addressOverlay);
final MapController mapController = mapView.getController();
//Start animating the map towards the given point.
mapController.animateTo(addressOverlay.getGeoPoint(), new Runnable(){
public void run(){
mapController.setZoom(12);
}
});
}else{
//No results for that address.
}
例外が発生しています: サービスは最初の行で利用できません (試行直後)。この問題を解決するための手順を教えてくれる人はいますか?
迅速な対応をお待ちください!!