public void onResume() { mApplication.onResumeMapActivity(); mMxLocationOverlay.enableMyLocation(); mMxLocationOverlay.enableCompass(); mCaricoOverlay.setData(mApplication.getCarPosition()); // if (mMovingOverlay != null) { // mMovingOverlay.onResume(); // } super.onResume(); MobclickAgent.onResume(this); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); GlobalApplication application = (GlobalApplication) getApplication(); if (application.isRunning()) { redirect(); } else { waitRedirect(); } }
private void checkInitSearch() { if (mMKSearch == null) { // 初始化搜索模块,注册事件监听 mMKSearch = new MKSearch(); mMKSearch.init(mApplication.getMapManager(), this); } }
private void toCaricoCenter() { GeoPoint carGeoPoint = mApplication.getCarPosition().getGps(); if (carGeoPoint != null) { mMapView.getController().setCenter(carGeoPoint); } else { toPointCenter(); } }
// 居中显示车辆位置或当前位 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); } }
@Override protected void onCreate(Bundle arg0) { super.onCreate(arg0); setContentView(R.layout.path); mPathActivity = this; mApplication = GlobalApplication.getApplication(); checkInitMapActivity(); checkInitMap(); checkInitSearch(); checkInitRoutes(); }
public void onPause() { mApplication.onPauseMapActivity(); mMxLocationOverlay.disableMyLocation(); mMxLocationOverlay.disableCompass(); // 关闭指南针 // if (mMovingOverlay != null) { // mMovingOverlay.onPause(); // } super.onPause(); MobclickAgent.onPause(this); mActionBar.setProgressBarVisibility(View.GONE); }
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); // } }
public void checkInitMapActivity() { mApplication.onCreateMapManager(); mApplication.onCreateMapActivity(this); }