aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/apps/cache/navi/DownloadStaticMapsApp.java
blob: faf3c36a9dfe6dc57a66302d1497e2892c67483b (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
33
34
package cgeo.geocaching.apps.cache.navi;

import cgeo.geocaching.R;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.cgWaypoint;

import android.app.Activity;

class DownloadStaticMapsApp extends AbstractStaticMapsApp {

    DownloadStaticMapsApp() {
        super(getString(R.string.cache_menu_download_map_static));
    }

    @Override
    public boolean isEnabled(cgCache cache) {
        return !cache.hasStaticMap();
    }

    @Override
    public boolean isEnabled(cgWaypoint waypoint) {
        return !hasStaticMap(waypoint);
    }

    @Override
    public void navigate(Activity activity, cgCache cache) {
        invokeStaticMaps(activity, cache, null, true);
    }

    @Override
    public void navigate(Activity activity, cgWaypoint waypoint) {
        invokeStaticMaps(activity, null, waypoint, true);
    }
}