コード例 #1
0
 @Override
 @Subscribe
 public void onEvent(SessionChangeEvent event) {
   super.onEvent(event);
   refreshNotes();
   mapView.invalidate();
 }
コード例 #2
0
  @Override
  protected void onPause() {
    super.onPause();

    measurementPresenter.unregisterListener(this);
    routeRefreshDetector.stop();
    traceOverlay.stopDrawing(mapView);
    heatMapDetector.stop();
    soundTraceDetector.stop();
  }
コード例 #3
0
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    noteOverlay.setContext(this);

    setContentView(R.layout.heat_map);

    mapView.getOverlays().add(routeOverlay);
    mapView.getOverlays().add(traceOverlay);

    if (!sessionManager.isSessionSaved()) {
      mapView.getOverlays().add(locationOverlay);
    }
  }
コード例 #4
0
  @Subscribe
  @Override
  public void onEvent(StreamUpdateEvent event) {
    super.onEvent(event);

    runOnUiThread(
        new Runnable() {
          @Override
          public void run() {
            mapView.invalidate();
          }
        });

    updater.onMapIdle();
    onMapIdle();
  }
コード例 #5
0
  @Override
  protected void onResume() {
    super.onResume();

    initialize();
    refreshNotes();
    spinnerAnimation.start();
    initializeMap();
    measurementPresenter.registerListener(this);
    initializeRouteOverlay();
    traceOverlay.startDrawing();

    checkConnection();

    updater = new HeatMapUpdater();
    heatMapDetector = detectMapIdle(mapView, HEAT_MAP_UPDATE_TIMEOUT, updater);
    soundTraceDetector = detectMapIdle(mapView, SOUND_TRACE_UPDATE_TIMEOUT, this);
  }
コード例 #6
0
 @Override
 public void onClick(View view) {
   switch (view.getId()) {
     case R.id.toggle_heat_map_button:
       toggleHeatMapVisibility();
       updateButtons();
       break;
     case R.id.zoom_in:
       mapView.getController().zoomIn();
       break;
     case R.id.zoom_out:
       mapView.getController().zoomOut();
       break;
     case R.id.locate:
       centerMap();
       break;
     case R.id.view_photo:
       Intents.viewPhoto(this, photoUri());
       break;
     default:
       super.onClick(view);
   }
 }
コード例 #7
0
  @Override
  protected void onRestoreInstanceState(Bundle savedInstanceState) {
    super.onRestoreInstanceState(savedInstanceState);

    zoomToSession = false;
  }