Exemplo n.º 1
0
 public void onResume() {
   mApplication.onResumeMapActivity();
   mMxLocationOverlay.enableMyLocation();
   mMxLocationOverlay.enableCompass();
   mCaricoOverlay.setData(mApplication.getCarPosition());
   // if (mMovingOverlay != null) {
   // mMovingOverlay.onResume();
   // }
   super.onResume();
   MobclickAgent.onResume(this);
 }
Exemplo n.º 2
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.main);
   GlobalApplication application = (GlobalApplication) getApplication();
   if (application.isRunning()) {
     redirect();
   } else {
     waitRedirect();
   }
 }
Exemplo n.º 3
0
 private void checkInitSearch() {
   if (mMKSearch == null) {
     // 初始化搜索模块,注册事件监听
     mMKSearch = new MKSearch();
     mMKSearch.init(mApplication.getMapManager(), this);
   }
 }
Exemplo n.º 4
0
 private void toCaricoCenter() {
   GeoPoint carGeoPoint = mApplication.getCarPosition().getGps();
   if (carGeoPoint != null) {
     mMapView.getController().setCenter(carGeoPoint);
   } else {
     toPointCenter();
   }
 }
Exemplo n.º 5
0
 // 居中显示车辆位置或当前位
 private void toPointCenter() {
   Location location = GlobalApplication.getLocation();
   if (location != null) {
     GeoPoint geopoint =
         new GeoPoint((int) (location.getLatitude() * 1e6), (int) (location.getLongitude() * 1e6));
     mMapView.getController().setCenter(geopoint);
   }
 }
Exemplo n.º 6
0
 @Override
 protected void onCreate(Bundle arg0) {
   super.onCreate(arg0);
   setContentView(R.layout.path);
   mPathActivity = this;
   mApplication = GlobalApplication.getApplication();
   checkInitMapActivity();
   checkInitMap();
   checkInitSearch();
   checkInitRoutes();
 }
Exemplo n.º 7
0
 public void onPause() {
   mApplication.onPauseMapActivity();
   mMxLocationOverlay.disableMyLocation();
   mMxLocationOverlay.disableCompass(); // 关闭指南针
   // if (mMovingOverlay != null) {
   // mMovingOverlay.onPause();
   // }
   super.onPause();
   MobclickAgent.onPause(this);
   mActionBar.setProgressBarVisibility(View.GONE);
 }
Exemplo n.º 8
0
  private void sendRoutesRequest(String begTime, String endTime) {
    // 查询车辆信息
    UserInfo userinfo = mApplication.getCurrUser(); // 得到当前用户
    if (userinfo != null) {
      OBDHelper.getVehicleHistory(userinfo.name, userinfo.pswd, begTime, endTime, this);
      mActionBar.setProgressBarVisibility(View.VISIBLE);
    }
    // else {
    // ToastShow.show(mRmctActivity, R.string.toast_no_login);
    // }

  }
Exemplo n.º 9
0
 public void checkInitMapActivity() {
   mApplication.onCreateMapManager();
   mApplication.onCreateMapActivity(this);
 }