Пример #1
0
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    parseContent = new ParseContent(mapActivity);
    decimalFormat = new DecimalFormat("0.00");
    points = new ArrayList<LatLng>();
    aQuery = new AQuery(mapActivity);
    dbHelper = new DBHelper(mapActivity);
    jobStatus = getArguments().getInt(AndyConstants.JOB_STATUS, AndyConstants.IS_WALKER_STARTED);
    requestDetail = (RequestDetail) getArguments().getSerializable(AndyConstants.REQUEST_DETAIL);

    if (jobStatus == AndyConstants.IS_WALK_COMPLETED) {
      startElapsedTimer();
      getPathFromServer();
    }

    setClientDetails(requestDetail);
    setjobStatus(jobStatus);
    setUpMap();

    locationHelper = new LocationHelper(getActivity());
    locationHelper.setLocationReceivedLister(this);
    locationHelper.onStart();

    // getDistance();

  }
Пример #2
0
  public void onDestroyView() {
    SupportMapFragment f = (SupportMapFragment) getFragmentManager().findFragmentById(R.id.jobMap);
    if (f != null) {
      try {
        getFragmentManager().beginTransaction().remove(f).commit();
      } catch (Exception e) {
        e.printStackTrace();
      }
    }

    googleMap = null;
    super.onDestroyView();
  }
Пример #3
0
 @Override
 public void onDestroy() {
   super.onDestroy();
   stopElapsedTimer();
 }