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

    setContentView(R.layout.activity_planning);

    planningMapFragment =
        ((PlanningMapFragment) getFragmentManager().findFragmentById(R.id.planningMapFragment));
    gestureMapFragment =
        ((GestureMapFragment) getFragmentManager().findFragmentById(R.id.gestureMapFragment));
    missionFragment = (MissionFragment) getFragmentManager().findFragmentById(R.id.missionFragment);
    surveyFragment = (SurveyFragment) getFragmentManager().findFragmentById(R.id.surveyFragment);

    lengthView = (TextView) findViewById(R.id.textViewTotalLength);

    polygon = new Polygon();

    gestureMapFragment.setOnPathFinishedListner(this);
    missionFragment.setMission(drone.mission);
    planningMapFragment.setMission(drone.mission);
    surveyFragment.setSurveyData(polygon, drone.mission.getDefaultAlt());
    surveyFragment.setOnSurveyListner(this);

    drone.mission.missionListner = this;

    checkIntent();

    update();
  }
Пример #2
0
 private void update() {
   planningMapFragment.update(polygon);
   missionFragment.update();
   updateDistanceView();
 }
Пример #3
0
 private void zoom() {
   planningMapFragment.zoomToExtents(drone.mission.getAllVisibleCoordinates());
 }