百度地图 baiduMap(二) 定位
2016-05-04 00:42
447 查看
地图定位 因为是虚拟机 没有信号,点位的是原点,
// 管理地图 BaiduMap baiduMap; // 定位客户端 LocationClient locationClient;
// 2.4 让框架中的接口指向实现类 locationClient = new LocationClient(this.getActivity()); // 实现类 MyBdlocationListener myBdlocationListener = new MyBdlocationListener(); locationClient.registerLocationListener(myBdlocationListener); //开始 locationClient.start();
// 2.3 写实现类 class MyBdlocationListener implements BDLocationListener { @Override public void onReceiveLocation(BDLocation bdLocation) { try { //4.9E-324 // 纬度 double latitude = bdLocation.getLatitude(); // 经度 double longitude = bdLocation.getLongitude(); Log.i("接收坐标", "纬度=" + latitude + ",经度=" + longitude); } catch (Exception e) { e.printStackTrace(); } }
相关文章推荐
- proxychains-ng 工作原理分析
- mailyWindef.h
- Session 'MainActivity': Error Launching activity
- zzulioj--1842--LT的求助again and again(模拟||LIS)
- OpenAI Gym 关于CartPole的模拟退火解法
- hdu3089 Josephus again(快速约瑟夫环)
- Responder Chain简析
- main()是程序运行的第一个函数吗?
- 小何讲进程: 阻塞进程函数 wait()和waitpid()
- 操作系统raid
- POJ-3216-Repairing Company(最小路径覆盖)
- wait和waitpid函数
- POJ 1422 Air Raid
- Air Infomation System 基于控制台的航班信息系统(方法总结)
- Intel S5000VSA(SAS)主板设置RAID 步骤【转】
- linker command failed with exit code 1 (use -v to see invocation)
- WM_PAINT 消息与 OnDraw、OnPaint()
- IDEA快捷键 如syso(sout Tab键)main(psvm Tab键)
- CodeForces 616E Sum of Remainders(数论)
- 山东省第一届ACM大学生程序设计竞赛 Fairy tale 大模拟