diff options
author | campbeb <bpcampbell@gmail.com> | 2012-06-02 18:21:19 +0900 |
---|---|---|
committer | campbeb <bpcampbell@gmail.com> | 2012-06-08 18:13:36 +0900 |
commit | bbc713d01b655870ffdd35941bdd0b3395e09210 (patch) | |
tree | 76935eb9787d9a8d72bfe16f63c71f99e313dda8 /main/src/cgeo/geocaching/apps/cache | |
parent | 550eb54d1c76dd2788c43ae9b67d43e57b90bf26 (diff) | |
download | cgeo-bbc713d01b655870ffdd35941bdd0b3395e09210.zip cgeo-bbc713d01b655870ffdd35941bdd0b3395e09210.tar.gz cgeo-bbc713d01b655870ffdd35941bdd0b3395e09210.tar.bz2 |
Display cache and waypoint information on compass
For caches: displays difficulty, terrain, and size.
For waypoints: displays waypoint type.
For direct navigation: displays nothing.
Also includes some refactoring in the code used do display
information about caches and waypoints.
Diffstat (limited to 'main/src/cgeo/geocaching/apps/cache')
-rw-r--r-- | main/src/cgeo/geocaching/apps/cache/navi/CompassApp.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/apps/cache/navi/CompassApp.java b/main/src/cgeo/geocaching/apps/cache/navi/CompassApp.java index da3d5f9..5275d53 100644 --- a/main/src/cgeo/geocaching/apps/cache/navi/CompassApp.java +++ b/main/src/cgeo/geocaching/apps/cache/navi/CompassApp.java @@ -6,6 +6,7 @@ import cgeo.geocaching.cgWaypoint; import cgeo.geocaching.cgeonavigate; import cgeo.geocaching.apps.AbstractApp; import cgeo.geocaching.geopoint.Geopoint; +import cgeo.geocaching.ui.Formatter; import android.app.Activity; @@ -27,7 +28,8 @@ class CompassApp extends AbstractApp implements CacheNavigationApp, WaypointNavi @Override public void navigate(Activity activity, cgWaypoint waypoint) { - cgeonavigate.startActivity(activity, waypoint.getPrefix() + "/" + waypoint.getLookup(), waypoint.getName(), waypoint.getCoords(), null); + cgeonavigate.startActivity(activity, waypoint.getPrefix() + "/" + waypoint.getLookup(), waypoint.getName(), waypoint.getCoords(), null, + waypoint.getWaypointType().getL10n()); } @Override @@ -37,7 +39,8 @@ class CompassApp extends AbstractApp implements CacheNavigationApp, WaypointNavi @Override public void navigate(Activity activity, cgCache cache) { - cgeonavigate.startActivity(activity, cache.getGeocode(), cache.getName(), cache.getCoords(), null); + cgeonavigate.startActivity(activity, cache.getGeocode(), cache.getName(), cache.getCoords(), null, + Formatter.formatCacheInfoShort(cache)); } @Override |