Exemplo n.º 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();
  }
Exemplo n.º 2
0
 @Override
 public void onMapClick(LatLng point) {
   Toast.makeText(this, "Draw your path", Toast.LENGTH_SHORT).show();
   gestureMapFragment.enableGestureDetection();
 }