e nl-114 ol-114">
+ private void startLocation(){
+ initLocation();
+ LogHelper.d(TAG,"当前是旅行模式,开始定位");
+ locationClient.setLocationOption(locationOption);
+ locationClient.startLocation();
+ }
+
+
+ private void destroyLocation(){
+ if (null != locationClient) {
+ locationClient.stopLocation();
+ locationClient.onDestroy();
+ locationClient = null;
+ locationOption = null;
+ }
+ mHandler.removeCallbacksAndMessages(null);
+ }
+
+ @Override
+ public boolean handleMessage(Message msg) {
+ if(msg.what == MSG_FETCH_TOUR_INFO){
+ return true;
+ }else if(msg.what == MSG_START_LOCATION){
+ startLocation();
+ return true;
+ }
+ return false;
+ }
+}