sb.append("城市编码 : " + location.getCityCode() + "\n"); sb.append("区 : " + location.getDistrict() + "\n"); sb.append("区域 码 : " + location.getAdCode() + "\n"); sb.append("地 址 : " + location.getAddress() + "\n"); sb.append("兴趣点 : " + location.getPoiName() + "\n");
Log.v(TAG, "城市编码 : " + location.getCityCode() + "\n"); Log.v(TAG, "区 : " + location.getDistrict() + "\n"); Log.v(TAG, "区域 码 : " + location.getAdCode() + "\n"); Log.v(TAG, "地 址 : " + location.getAddress() + "\n"); Log.v(TAG, "兴趣点 : " + location.getPoiName() + "\n");
sb.append("城市编码 : " + location.getCityCode() + "\n"); sb.append("区 : " + location.getDistrict() + "\n"); sb.append("区域 码 : " + location.getAdCode() + "\n"); sb.append("地 址 : " + location.getAddress() + "\n"); sb.append("兴趣点 : " + location.getPoiName() + "\n");
/** * 定位成功,解析AMapLocation对象 * * @param aMapLocation */ private void parseAMapLocation(AMapLocation aMapLocation) { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = new Date(aMapLocation.getTime()); df.format(date); Log.e(TAG, "当前定位结果来源:" + aMapLocation.getLocationType() + "\n纬度:" + aMapLocation.getLatitude() + "\n经度:" + aMapLocation.getLongitude() + "\n精度信息:" + aMapLocation.getAccuracy() + "\n地址:" + aMapLocation.getAddress() + "\n国家信息:" + aMapLocation.getCountry() + "\n省信息:" + aMapLocation.getProvince() + "\n城市信息:" + aMapLocation.getCity() + "\n城区信息:" + aMapLocation.getDistrict() + "\n街道信息:" + aMapLocation.getStreet() + "\n街道门牌号信息:" + aMapLocation.getStreetNum() + "\n城市编码:" + aMapLocation.getCityCode() + "\n地区编码:" + aMapLocation.getAdCode() + "\n当前定位点的AOI信息:" + aMapLocation.getAoiName() + "\n当前室内定位的建筑物Id:" + aMapLocation.getBuildingId() + "\n当前室内定位的楼层:" + aMapLocation.getFloor() + "\nGPS的当前状态:" + aMapLocation.getGpsAccuracyStatus() + "\n定位时间:" + df.toString() ); }
aMapLocation.getAdCode();//地区编码