高德地图-Android-逆地理转换:经纬度转换成地址

		GeocodeSearch geocoderSearch = new GeocodeSearch(this); 
		geocoderSearch.setOnGeocodeSearchListener(new OnGeocodeSearchListener(){

			@Override
			public void onGeocodeSearched(GeocodeResult result, int rCode) {
				// TODO Auto-generated method stub
				
			}

			@Override
			public void onRegeocodeSearched(RegeocodeResult result, int rCode) {
				
				String formatAddress = result.getRegeocodeAddress().getFormatAddress();
				Log.e("formatAddress", "formatAddress:"+formatAddress);
				Log.e("formatAddress", "rCode:"+rCode);
				
			}}); 
		LatLonPoint   lp = new LatLonPoint(39.992706,116.396574);
		RegeocodeQuery query = new RegeocodeQuery(lp, 200,GeocodeSearch.AMAP); 
		geocoderSearch.getFromLocationAsyn(query); 
	


rCode为0表示获取地址成功,

            为60 表示高德地图的key不行,需要从新申请一个

   为27表示网络错误

           为32也是表示key无效


你可能感兴趣的:(Android开发)