aboutsummaryrefslogtreecommitdiffstats
path: root/src/cgeo/geocaching/apps/cache/navi/InternalMap.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgeo/geocaching/apps/cache/navi/InternalMap.java')
-rw-r--r--src/cgeo/geocaching/apps/cache/navi/InternalMap.java69
1 files changed, 35 insertions, 34 deletions
diff --git a/src/cgeo/geocaching/apps/cache/navi/InternalMap.java b/src/cgeo/geocaching/apps/cache/navi/InternalMap.java
index 4936842..0aa49db 100644
--- a/src/cgeo/geocaching/apps/cache/navi/InternalMap.java
+++ b/src/cgeo/geocaching/apps/cache/navi/InternalMap.java
@@ -1,10 +1,5 @@
package cgeo.geocaching.apps.cache.navi;
-import java.util.UUID;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.content.res.Resources;
import cgeo.geocaching.R;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.cgGeo;
@@ -12,35 +7,41 @@ import cgeo.geocaching.cgSettings;
import cgeo.geocaching.cgWaypoint;
import cgeo.geocaching.geopoint.Geopoint;
+import android.app.Activity;
+import android.content.Intent;
+import android.content.res.Resources;
+
+import java.util.UUID;
+
class InternalMap extends AbstractInternalMap implements
- NavigationApp {
-
- InternalMap(Resources res) {
- super(res.getString(R.string.cache_menu_map), null);
- }
-
- @Override
- public boolean invoke(cgGeo geo, Activity activity, Resources res,
- cgCache cache,
- final UUID searchId, cgWaypoint waypoint, final Geopoint coords) {
- cgSettings settings = getSettings(activity);
- Intent mapIntent = new Intent(activity, settings.getMapFactory().getMapClass());
- if (cache != null) {
- mapIntent.putExtra("detail", false);
- mapIntent.putExtra("geocode", cache.geocode);
- }
- if (searchId != null) {
- mapIntent.putExtra("detail", true);
- mapIntent.putExtra("searchid", searchId.toString());
- }
- if (waypoint != null) {
- mapIntent.putExtra("latitude", waypoint.coords.getLatitude());
- mapIntent.putExtra("longitude", waypoint.coords.getLongitude());
- mapIntent.putExtra("wpttype", waypoint.type);
- }
-
- activity.startActivity(mapIntent);
- return true;
- }
+ NavigationApp {
+
+ InternalMap(Resources res) {
+ super(res.getString(R.string.cache_menu_map), null);
+ }
+
+ @Override
+ public boolean invoke(cgGeo geo, Activity activity, Resources res,
+ cgCache cache,
+ final UUID searchId, cgWaypoint waypoint, final Geopoint coords) {
+ cgSettings settings = getSettings(activity);
+ Intent mapIntent = new Intent(activity, settings.getMapFactory().getMapClass());
+ if (cache != null) {
+ mapIntent.putExtra("detail", false);
+ mapIntent.putExtra("geocode", cache.geocode);
+ }
+ if (searchId != null) {
+ mapIntent.putExtra("detail", true);
+ mapIntent.putExtra("searchid", searchId.toString());
+ }
+ if (waypoint != null) {
+ mapIntent.putExtra("latitude", waypoint.coords.getLatitude());
+ mapIntent.putExtra("longitude", waypoint.coords.getLongitude());
+ mapIntent.putExtra("wpttype", waypoint.type);
+ }
+
+ activity.startActivity(mapIntent);
+ return true;
+ }
}