Beispiel #1
0
  private void init() {
    try {
      application = (App) getContext().getApplicationContext();
      manager = application.getModelManager();
      cache = new MapCacheImpl(manager);
      Drawable defMarker = getContext().getResources().getDrawable(R.drawable.img_questo_q_stand);
      overlay = new QuestoMapOverlay(getContext(), this, defMarker);
      locationOverlay = new MyLocationOverlay(this.getContext(), this);
      locationOverlay.enableMyLocation();
      locationOverlay.enableCompass();
      getOverlays().add(overlay);
      getOverlays().add(locationOverlay);

      mapListener = new QuestoMapListener();
      initLocationUpdates();
      setBuiltInZoomControls(true);
    } catch (Exception e) {
      Log.e(TAG, "Could not initialize questo map view");
      e.printStackTrace();
    }
  }
Beispiel #2
0
 public void restrictToPlacesFromTournament(Tournament tournament) {
   List<Place> donePlaces =
       manager.getTournamentTasksDonePlaces(application.getLoggedinUser(), tournament);
   cache = new TournamentMapCacheImpl(manager, tournament, donePlaces);
 }