我的目前實(shí)現(xiàn)了定位和模式的切換。和講解的有那么一丟丟的出入,可以去clone我的代碼,地址:
https://github.com/Lixiaojie18/BaiduDemo.git
https://github.com/Lixiaojie18/BaiduDemo.git
2016-11-24
最新回答 / Async_YY
看看你是不是少在Activity生命周期onStart()沒有添加開啟的允許和啟動(dòng)定位protected void onStart() { ? ?super.onStart(); ? ?//開啟定位 ? ?mBaiduMap.setMyLocationEnabled(true); ? //開啟定位的允許 ? ?if (!mLocationClient.isStarted()) { ? ? ? ?mLocationClient.start(); ?//啟動(dòng)定位 ? ?}}
2016-11-18
不能顯示地圖的話,如果代碼沒有問題那就是key的問題,重新申請(qǐng)下key.對(duì)了,測試的手機(jī)也有可能出問題,換過一臺(tái)手機(jī)試試
2016-11-13