我的目前實現(xiàn)了定位和模式的切換。和講解的有那么一丟丟的出入,可以去clone我的代碼,地址:
https://github.com/Lixiaojie18/BaiduDemo.git
https://github.com/Lixiaojie18/BaiduDemo.git
2016-11-24
最新回答 / Async_YY
看看你是不是少在Activity生命周期onStart()沒有添加開啟的允許和啟動定位protected void onStart() { ? ?super.onStart(); ? ?//開啟定位 ? ?mBaiduMap.setMyLocationEnabled(true); ? //開啟定位的允許 ? ?if (!mLocationClient.isStarted()) { ? ? ? ?mLocationClient.start(); ?//啟動定位 ? ?}}
2016-11-18