blob: b326105ade8071a63f0c2036ff81e4ce21a3212d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
package cgeo.geocaching.apps.cache.navi;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.Waypoint;
import cgeo.geocaching.apps.AbstractLocusApp;
import android.app.Activity;
import java.util.Collections;
class LocusApp extends AbstractLocusApp implements CacheNavigationApp, WaypointNavigationApp {
@Override
public boolean isEnabled(Waypoint waypoint) {
return waypoint.getCoords() != null;
}
/**
* Show a single cache with waypoints or a single waypoint in Locus.
* This method constructs a list of cache and waypoints only.
*
*/
@Override
public void navigate(Activity activity, Waypoint waypoint) {
showInLocus(Collections.singletonList(waypoint), true, false, activity);
}
@Override
public void navigate(Activity activity, cgCache cache) {
showInLocus(Collections.singletonList(cache), true, false, activity);
}
}
|