首页 > 移动平台 > 详细

Android LBS 百度地图(参考: 《第一行代码》第二版(郭霖著)11.3.4 显示看得懂的定位信息:准确文字地址)

时间:2017-06-23 17:14:46      阅读:972      评论:0      收藏:0      [点我收藏+]

经纬度不能直接转换为人的准确认知,需要显示文字信息。

       currentPosition.append("地址:").append(location.getAddrStr()).append("\n");
            Log.d("map Address",location.getAddrStr()+"");
            currentPosition.append("国家:").append(location.getCountry()).append("\n");
            Log.d("map Coutntry",location.getCountry()+"");
            currentPosition.append("省:").append(location.getProvince()).append("\n");
            currentPosition.append("市:").append(location.getCity()).append("\n");
            currentPosition.append("区:").append(location.getDistrict()).append("\n");
            currentPosition.append("街道:").append(location.getStreet()).append("\n");

很实用有趣的功能,容易激发学习兴趣。

技术分享

Android LBS 百度地图(参考: 《第一行代码》第二版(郭霖著)11.3.4 显示看得懂的定位信息:准确文字地址)

原文:http://www.cnblogs.com/hbuwyg/p/7070834.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!