diff options
| -rw-r--r-- | src/cgeo/geocaching/apps/cache/navi/LocusApp.java | 8 | ||||
| -rw-r--r-- | src/cgeo/geocaching/apps/cachelist/LocusCacheListApp.java | 2 | ||||
| -rw-r--r-- | src/cgeo/geocaching/cgBase.java | 126 | ||||
| -rw-r--r-- | src/cgeo/geocaching/cgCacheListAdapter.java | 27 | ||||
| -rw-r--r-- | src/cgeo/geocaching/cgeocaches.java | 33 | ||||
| -rw-r--r-- | src/cgeo/geocaching/cgeodetail.java | 51 | ||||
| -rw-r--r-- | src/cgeo/geocaching/cgeopopup.java | 36 | ||||
| -rw-r--r-- | src/cgeo/geocaching/cgeotrackable.java | 18 | ||||
| -rw-r--r-- | src/cgeo/geocaching/cgeowaypoint.java | 10 | ||||
| -rw-r--r-- | src/cgeo/geocaching/mapcommon/cgeomap.java | 6 |
10 files changed, 135 insertions, 182 deletions
diff --git a/src/cgeo/geocaching/apps/cache/navi/LocusApp.java b/src/cgeo/geocaching/apps/cache/navi/LocusApp.java index 2b4baf4..41b9896 100644 --- a/src/cgeo/geocaching/apps/cache/navi/LocusApp.java +++ b/src/cgeo/geocaching/apps/cache/navi/LocusApp.java @@ -60,12 +60,12 @@ class LocusApp extends AbstractLocusApp implements NavigationApp { int icon = -1; if (cache != null) { - icon = cgBase.getIcon(true, cache.type, cache.own, cache.found, + icon = cgBase.getMarkerIcon(true, cache.type, cache.own, cache.found, cache.disabled || cache.archived); } else if (waypoint != null) { - icon = cgBase.getIcon(false, waypoint.type, false, false, false); + icon = cgBase.getMarkerIcon(false, waypoint.type, false, false, false); } else { - icon = cgBase.getIcon(false, "waypoint", false, false, false); + icon = cgBase.getMarkerIcon(false, "waypoint", false, false, false); } if (icon > 0) { @@ -139,7 +139,7 @@ class LocusApp extends AbstractLocusApp implements NavigationApp { continue; } - final int wpIcon = cgBase.getIcon(false, wp.type, false, + final int wpIcon = cgBase.getMarkerIcon(false, wp.type, false, false, false); if (wpIcon > 0) { diff --git a/src/cgeo/geocaching/apps/cachelist/LocusCacheListApp.java b/src/cgeo/geocaching/apps/cachelist/LocusCacheListApp.java index 0e03821..a9c438b 100644 --- a/src/cgeo/geocaching/apps/cachelist/LocusCacheListApp.java +++ b/src/cgeo/geocaching/apps/cachelist/LocusCacheListApp.java @@ -44,7 +44,7 @@ class LocusCacheListApp extends AbstractLocusApp implements CacheListApp { // cache waypoints for (cgCache cache : cacheListCoord) { - final int wpIcon = cgBase.getIcon(true, cache.type, cache.own, cache.found, cache.disabled); + final int wpIcon = cgBase.getMarkerIcon(true, cache.type, cache.own, cache.found, cache.disabled); if (wpIcon > 0) { // load icon diff --git a/src/cgeo/geocaching/cgBase.java b/src/cgeo/geocaching/cgBase.java index c8a5f14..79e67b5 100644 --- a/src/cgeo/geocaching/cgBase.java +++ b/src/cgeo/geocaching/cgBase.java @@ -5022,9 +5022,85 @@ public class cgBase { } return out; } + + public static int getCacheIcon(final String type) { + fillIconsMap(); + Integer iconId = gcIcons.get("type_" + type); + if (iconId != null) { + return iconId; + } + // fallback to traditional if some icon type is not correct + return gcIcons.get("type_traditional"); + } + + public static int getMarkerIcon(final boolean cache, final String type, final boolean own, final boolean found, final boolean disabled) { + fillIconsMap(); + + if (wpIcons.isEmpty()) { + wpIcons.put("waypoint", R.drawable.marker_waypoint_waypoint); + wpIcons.put("flag", R.drawable.marker_waypoint_flag); + wpIcons.put("pkg", R.drawable.marker_waypoint_pkg); + wpIcons.put("puzzle", R.drawable.marker_waypoint_puzzle); + wpIcons.put("stage", R.drawable.marker_waypoint_stage); + wpIcons.put("trailhead", R.drawable.marker_waypoint_trailhead); + } + + int icon = -1; + String iconTxt = null; + + if (cache) { + if (type != null && type.length() > 0) { + if (own) { + iconTxt = type + "-own"; + } else if (found) { + iconTxt = type + "-found"; + } else if (disabled) { + iconTxt = type + "-disabled"; + } else { + iconTxt = type; + } + } else { + iconTxt = "traditional"; + } + + if (gcIcons.containsKey(iconTxt)) { + icon = gcIcons.get(iconTxt); + } else { + icon = gcIcons.get("traditional"); + } + } else { + if (type != null && type.length() > 0) { + iconTxt = type; + } else { + iconTxt = "waypoint"; + } + + if (wpIcons.containsKey(iconTxt)) { + icon = wpIcons.get(iconTxt); + } else { + icon = wpIcons.get("waypoint"); + } + } + + return icon; + } - public static int getIcon(boolean cache, String type, boolean own, boolean found, boolean disabled) { + private static void fillIconsMap() { if (gcIcons.isEmpty()) { + gcIcons.put("type_ape", R.drawable.type_ape); + gcIcons.put("type_cito", R.drawable.type_cito); + gcIcons.put("type_earth", R.drawable.type_earth); + gcIcons.put("type_event", R.drawable.type_event); + gcIcons.put("type_letterbox", R.drawable.type_letterbox); + gcIcons.put("type_locationless", R.drawable.type_locationless); + gcIcons.put("type_mega", R.drawable.type_mega); + gcIcons.put("type_multi", R.drawable.type_multi); + gcIcons.put("type_traditional", R.drawable.type_traditional); + gcIcons.put("type_virtual", R.drawable.type_virtual); + gcIcons.put("type_webcam", R.drawable.type_webcam); + gcIcons.put("type_wherigo", R.drawable.type_wherigo); + gcIcons.put("type_mystery", R.drawable.type_mystery); + gcIcons.put("type_gchq", R.drawable.type_hq); // default markers gcIcons.put("ape", R.drawable.marker_cache_ape); gcIcons.put("cito", R.drawable.marker_cache_cito); @@ -5086,54 +5162,6 @@ public class cgBase { gcIcons.put("mystery-disabled", R.drawable.marker_cache_mystery_disabled); gcIcons.put("gchq-disabled", R.drawable.marker_cache_gchq_disabled); } - - if (wpIcons.isEmpty()) { - wpIcons.put("waypoint", R.drawable.marker_waypoint_waypoint); - wpIcons.put("flag", R.drawable.marker_waypoint_flag); - wpIcons.put("pkg", R.drawable.marker_waypoint_pkg); - wpIcons.put("puzzle", R.drawable.marker_waypoint_puzzle); - wpIcons.put("stage", R.drawable.marker_waypoint_stage); - wpIcons.put("trailhead", R.drawable.marker_waypoint_trailhead); - } - - int icon = -1; - String iconTxt = null; - - if (cache) { - if (type != null && type.length() > 0) { - if (own) { - iconTxt = type + "-own"; - } else if (found) { - iconTxt = type + "-found"; - } else if (disabled) { - iconTxt = type + "-disabled"; - } else { - iconTxt = type; - } - } else { - iconTxt = "traditional"; - } - - if (gcIcons.containsKey(iconTxt)) { - icon = gcIcons.get(iconTxt); - } else { - icon = gcIcons.get("traditional"); - } - } else { - if (type != null && type.length() > 0) { - iconTxt = type; - } else { - iconTxt = "waypoint"; - } - - if (wpIcons.containsKey(iconTxt)) { - icon = wpIcons.get(iconTxt); - } else { - icon = wpIcons.get("waypoint"); - } - } - - return icon; } public static boolean runNavigation(Activity activity, Resources res, cgSettings settings, Double latitude, Double longitude) { diff --git a/src/cgeo/geocaching/cgCacheListAdapter.java b/src/cgeo/geocaching/cgCacheListAdapter.java index 64bf3ea..57c6e5f 100644 --- a/src/cgeo/geocaching/cgCacheListAdapter.java +++ b/src/cgeo/geocaching/cgCacheListAdapter.java @@ -55,7 +55,7 @@ public class cgCacheListAdapter extends ArrayAdapter<cgCache> { private boolean sort = true; private int checked = 0; private boolean selectMode = false; - private HashMap<String, Drawable> gcIcons = new HashMap<String, Drawable>(); + private static HashMap<String, Drawable> gcIconDrawables = new HashMap<String, Drawable>(); private ArrayList<cgCompassMini> compasses = new ArrayList<cgCompassMini>(); private ArrayList<cgDistanceView> distances = new ArrayList<cgDistanceView>(); private int[] ratingBcgs = new int[3]; @@ -81,21 +81,10 @@ public class cgCacheListAdapter extends ArrayAdapter<cgCache> { activity.getWindowManager().getDefaultDisplay().getMetrics(metrics); pixelDensity = metrics.density; - if (gcIcons == null || gcIcons.isEmpty()) { - gcIcons.put("ape", (Drawable) activity.getResources().getDrawable(R.drawable.type_ape)); - gcIcons.put("cito", (Drawable) activity.getResources().getDrawable(R.drawable.type_cito)); - gcIcons.put("earth", (Drawable) activity.getResources().getDrawable(R.drawable.type_earth)); - gcIcons.put("event", (Drawable) activity.getResources().getDrawable(R.drawable.type_event)); - gcIcons.put("letterbox", (Drawable) activity.getResources().getDrawable(R.drawable.type_letterbox)); - gcIcons.put("locationless", (Drawable) activity.getResources().getDrawable(R.drawable.type_locationless)); - gcIcons.put("mega", (Drawable) activity.getResources().getDrawable(R.drawable.type_mega)); - gcIcons.put("multi", (Drawable) activity.getResources().getDrawable(R.drawable.type_multi)); - gcIcons.put("traditional", (Drawable) activity.getResources().getDrawable(R.drawable.type_traditional)); - gcIcons.put("virtual", (Drawable) activity.getResources().getDrawable(R.drawable.type_virtual)); - gcIcons.put("webcam", (Drawable) activity.getResources().getDrawable(R.drawable.type_webcam)); - gcIcons.put("wherigo", (Drawable) activity.getResources().getDrawable(R.drawable.type_wherigo)); - gcIcons.put("mystery", (Drawable) activity.getResources().getDrawable(R.drawable.type_mystery)); - gcIcons.put("gchq", (Drawable) activity.getResources().getDrawable(R.drawable.type_hq)); + if (gcIconDrawables == null || gcIconDrawables.isEmpty()) { + for (String cacheType : cgBase.cacheTypesInv.keySet()) { + gcIconDrawables.put(cacheType, (Drawable) activity.getResources().getDrawable(cgBase.getCacheIcon(cacheType))); + } } if (settings.skin == 0) { @@ -471,10 +460,10 @@ public class cgCacheListAdapter extends ArrayAdapter<cgCache> { } holder.text.setText(cache.nameSp, TextView.BufferType.SPANNABLE); - if (gcIcons.containsKey(cache.type)) { // cache icon - holder.text.setCompoundDrawablesWithIntrinsicBounds(gcIcons.get(cache.type), null, null, null); + if (gcIconDrawables.containsKey(cache.type)) { // cache icon + holder.text.setCompoundDrawablesWithIntrinsicBounds(gcIconDrawables.get(cache.type), null, null, null); } else { // unknown cache type, "mystery" icon - holder.text.setCompoundDrawablesWithIntrinsicBounds(gcIcons.get("mystery"), null, null, null); + holder.text.setCompoundDrawablesWithIntrinsicBounds(gcIconDrawables.get("mystery"), null, null, null); } if (holder.inventory.getChildCount() > 0) { diff --git a/src/cgeo/geocaching/cgeocaches.java b/src/cgeo/geocaching/cgeocaches.java index 40b379f..c01ae72 100644 --- a/src/cgeo/geocaching/cgeocaches.java +++ b/src/cgeo/geocaching/cgeocaches.java @@ -40,6 +40,7 @@ import android.widget.EditText; import android.widget.ListView; import android.widget.RelativeLayout; import android.widget.TextView; +import cgeo.geocaching.activity.AbstractActivity; import cgeo.geocaching.activity.AbstractListActivity; import cgeo.geocaching.activity.ActivityMixin; import cgeo.geocaching.apps.cache.navi.NavigationAppFactory; @@ -2546,4 +2547,36 @@ public class cgeocaches extends AbstractListActivity { cachesIntent.putExtra(EXTRAS_LIST_TYPE, "offline"); context.startActivity(cachesIntent); } + + public static void startActivityCachesAround(final AbstractActivity context, final Double latitude, final Double longitude) { + cgeocaches cachesActivity = new cgeocaches(); + + Intent cachesIntent = new Intent(context, cachesActivity.getClass()); + cachesIntent.putExtra("type", "coordinate"); + cachesIntent.putExtra("latitude", latitude); + cachesIntent.putExtra("longitude", longitude); + cachesIntent.putExtra("cachetype", context.getSettings().cacheType); + + context.startActivity(cachesIntent); + } + + public static void startActivityCacheOwner(final AbstractActivity context, final String userName) { + final Intent cachesIntent = new Intent(context, cgeocaches.class); + + cachesIntent.putExtra("type", "owner"); + cachesIntent.putExtra("username", userName); + cachesIntent.putExtra("cachetype", context.getSettings().cacheType); + + context.startActivity(cachesIntent); + } + + public static void startActivityCacheUser(final AbstractActivity context, final String userName) { + final Intent cachesIntent = new Intent(context, cgeocaches.class); + + cachesIntent.putExtra("type", "username"); + cachesIntent.putExtra("username", userName); + cachesIntent.putExtra("cachetype", context.getSettings().cacheType); + + context.startActivity(cachesIntent); + } }
\ No newline at end of file diff --git a/src/cgeo/geocaching/cgeodetail.java b/src/cgeo/geocaching/cgeodetail.java index 225e345..e4d748c 100644 --- a/src/cgeo/geocaching/cgeodetail.java +++ b/src/cgeo/geocaching/cgeodetail.java @@ -80,7 +80,6 @@ public class cgeodetail extends AbstractActivity { private loadLongDesc threadLongDesc = null; private Thread storeThread = null; private Thread refreshThread = null; - private HashMap<String, Integer> gcIcons = new HashMap<String, Integer>(); private ProgressDialog storeDialog = null; private ProgressDialog refreshDialog = null; private ProgressDialog dropDialog = null; @@ -449,24 +448,10 @@ public class cgeodetail extends AbstractActivity { final int id = item.getItemId(); if (id == 1) { - final Intent cachesIntent = new Intent(this, cgeocaches.class); - - cachesIntent.putExtra("type", "owner"); - cachesIntent.putExtra("username", contextMenuUser); - cachesIntent.putExtra("cachetype", settings.cacheType); - - startActivity(cachesIntent); - + cgeocaches.startActivityCacheOwner(this, contextMenuUser); return true; } else if (id == 2) { - final Intent cachesIntent = new Intent(this, cgeocaches.class); - - cachesIntent.putExtra("type", "username"); - cachesIntent.putExtra("username", contextMenuUser); - cachesIntent.putExtra("cachetype", settings.cacheType); - - startActivity(cachesIntent); - + cgeocaches.startActivityCacheUser(this, contextMenuUser); return true; } else if (id == 3) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.geocaching.com/profile/?u=" + URLEncoder.encode(contextMenuUser)))); @@ -601,22 +586,6 @@ public class cgeodetail extends AbstractActivity { } try { - if (gcIcons == null || gcIcons.isEmpty()) { - gcIcons.put("ape", R.drawable.type_ape); - gcIcons.put("cito", R.drawable.type_cito); - gcIcons.put("earth", R.drawable.type_earth); - gcIcons.put("event", R.drawable.type_event); - gcIcons.put("letterbox", R.drawable.type_letterbox); - gcIcons.put("locationless", R.drawable.type_locationless); - gcIcons.put("mega", R.drawable.type_mega); - gcIcons.put("multi", R.drawable.type_multi); - gcIcons.put("traditional", R.drawable.type_traditional); - gcIcons.put("virtual", R.drawable.type_virtual); - gcIcons.put("webcam", R.drawable.type_webcam); - gcIcons.put("wherigo", R.drawable.type_wherigo); - gcIcons.put("gchq", R.drawable.type_hq); - gcIcons.put("mystery", R.drawable.type_mystery); - } if (null == geocode && cache.geocode.length() > 0) { @@ -639,11 +608,7 @@ public class cgeodetail extends AbstractActivity { detailsList.removeAllViews(); // actionbar icon, default myster< - String typeId = "mystery"; - if (cache.type != null && gcIcons.containsKey(cache.type)) { // cache icon - typeId = cache.type; - } - ((TextView) findViewById(R.id.actionbar_title)).setCompoundDrawablesWithIntrinsicBounds((Drawable) getResources().getDrawable(gcIcons.get(typeId)), null, null, null); + ((TextView) findViewById(R.id.actionbar_title)).setCompoundDrawablesWithIntrinsicBounds((Drawable) getResources().getDrawable(cgBase.getCacheIcon(cache.type)), null, null, null); // cache name (full name) itemLayout = (RelativeLayout) inflater.inflate(R.layout.cache_item, null); @@ -1426,15 +1391,7 @@ public class cgeodetail extends AbstractActivity { } private void cachesAround() { - cgeocaches cachesActivity = new cgeocaches(); - - Intent cachesIntent = new Intent(this, cachesActivity.getClass()); - cachesIntent.putExtra("type", "coordinate"); - cachesIntent.putExtra("latitude", cache.latitude); - cachesIntent.putExtra("longitude", cache.longitude); - cachesIntent.putExtra("cachetype", settings.cacheType); - - startActivity(cachesIntent); + cgeocaches.startActivityCachesAround(this, cache.latitude, cache.longitude); finish(); } diff --git a/src/cgeo/geocaching/cgeopopup.java b/src/cgeo/geocaching/cgeopopup.java index 54be58c..8531338 100644 --- a/src/cgeo/geocaching/cgeopopup.java +++ b/src/cgeo/geocaching/cgeopopup.java @@ -1,6 +1,5 @@ package cgeo.geocaching; -import java.util.HashMap; import java.util.Locale; import android.app.ProgressDialog; @@ -38,7 +37,6 @@ public class cgeopopup extends AbstractActivity { private ProgressDialog storeDialog = null; private ProgressDialog dropDialog = null; private TextView cacheDistance = null; - private HashMap<String, Integer> gcIcons = new HashMap<String, Integer>(); private Handler ratingHandler = new Handler() { @Override @@ -214,23 +212,6 @@ public class cgeopopup extends AbstractActivity { TextView itemValue; LinearLayout itemStars; - if (gcIcons == null || gcIcons.isEmpty()) { - gcIcons.put("ape", R.drawable.type_ape); - gcIcons.put("cito", R.drawable.type_cito); - gcIcons.put("earth", R.drawable.type_earth); - gcIcons.put("event", R.drawable.type_event); - gcIcons.put("letterbox", R.drawable.type_letterbox); - gcIcons.put("locationless", R.drawable.type_locationless); - gcIcons.put("mega", R.drawable.type_mega); - gcIcons.put("multi", R.drawable.type_multi); - gcIcons.put("traditional", R.drawable.type_traditional); - gcIcons.put("virtual", R.drawable.type_virtual); - gcIcons.put("webcam", R.drawable.type_webcam); - gcIcons.put("wherigo", R.drawable.type_wherigo); - gcIcons.put("mystery", R.drawable.type_mystery); - gcIcons.put("gchq", R.drawable.type_hq); - } - if (cache.name != null && cache.name.length() > 0) { setTitle(cache.name); } else { @@ -245,11 +226,7 @@ public class cgeopopup extends AbstractActivity { detailsList.removeAllViews(); // actionbar icon - if (cache.type != null && gcIcons.containsKey(cache.type)) { // cache icon - ((TextView) findViewById(R.id.actionbar_title)).setCompoundDrawablesWithIntrinsicBounds((Drawable) getResources().getDrawable(gcIcons.get(cache.type)), null, null, null); - } else { // unknown cache type, "mystery" icon - ((TextView) findViewById(R.id.actionbar_title)).setCompoundDrawablesWithIntrinsicBounds((Drawable) getResources().getDrawable(gcIcons.get("mystery")), null, null, null); - } + ((TextView) findViewById(R.id.actionbar_title)).setCompoundDrawablesWithIntrinsicBounds((Drawable) getResources().getDrawable(cgBase.getCacheIcon(cache.type)), null, null, null); // cache type itemLayout = (RelativeLayout) inflater.inflate(R.layout.cache_item, null); @@ -561,16 +538,7 @@ public class cgeopopup extends AbstractActivity { showToast(res.getString(R.string.err_location_unknown)); } - cgeocaches cachesActivity = new cgeocaches(); - - Intent cachesIntent = new Intent(this, cachesActivity.getClass()); - - cachesIntent.putExtra("type", "coordinate"); - cachesIntent.putExtra("latitude", cache.latitude); - cachesIntent.putExtra("longitude", cache.longitude); - cachesIntent.putExtra("cachetype", settings.cacheType); - - startActivity(cachesIntent); + cgeocaches.startActivityCachesAround(this, cache.latitude, cache.longitude); finish(); } diff --git a/src/cgeo/geocaching/cgeotrackable.java b/src/cgeo/geocaching/cgeotrackable.java index d0f82be..d41324e 100644 --- a/src/cgeo/geocaching/cgeotrackable.java +++ b/src/cgeo/geocaching/cgeotrackable.java @@ -420,24 +420,10 @@ public class cgeotrackable extends AbstractActivity { final int id = item.getItemId(); if (id == 1) { - final Intent cachesIntent = new Intent(this, cgeocaches.class); - - cachesIntent.putExtra("type", "owner"); - cachesIntent.putExtra("username", contextMenuUser); - cachesIntent.putExtra("cachetype", settings.cacheType); - - startActivity(cachesIntent); - + cgeocaches.startActivityCacheOwner(this, contextMenuUser); return true; } else if (id == 2) { - final Intent cachesIntent = new Intent(this, cgeocaches.class); - - cachesIntent.putExtra("type", "username"); - cachesIntent.putExtra("username", contextMenuUser); - cachesIntent.putExtra("cachetype", settings.cacheType); - - startActivity(cachesIntent); - + cgeocaches.startActivityCacheUser(this, contextMenuUser); return true; } else if (id == 3) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.geocaching.com/profile/?u=" + URLEncoder.encode(contextMenuUser)))); diff --git a/src/cgeo/geocaching/cgeowaypoint.java b/src/cgeo/geocaching/cgeowaypoint.java index e4ec379..b964df7 100644 --- a/src/cgeo/geocaching/cgeowaypoint.java +++ b/src/cgeo/geocaching/cgeowaypoint.java @@ -257,15 +257,7 @@ public class cgeowaypoint extends AbstractActivity { showToast(res.getString(R.string.err_location_unknown)); } - cgeocaches cachesActivity = new cgeocaches(); - - Intent cachesIntent = new Intent(this, cachesActivity.getClass()); - cachesIntent.putExtra("type", "coordinate"); - cachesIntent.putExtra("latitude", waypoint.latitude); - cachesIntent.putExtra("longitude", waypoint.longitude); - cachesIntent.putExtra("cachetype", settings.cacheType); - - startActivity(cachesIntent); + cgeocaches.startActivityCachesAround(this, waypoint.latitude, waypoint.longitude); finish(); } diff --git a/src/cgeo/geocaching/mapcommon/cgeomap.java b/src/cgeo/geocaching/mapcommon/cgeomap.java index 8500e1c..9360899 100644 --- a/src/cgeo/geocaching/mapcommon/cgeomap.java +++ b/src/cgeo/geocaching/mapcommon/cgeomap.java @@ -1280,7 +1280,7 @@ public class cgeomap extends MapBase { coordinates.add(coord); item = settings.getMapFactory().getCacheOverlayItem(coord, cacheOne.type); - icon = cgBase.getIcon(true, cacheOne.type, cacheOne.own, cacheOne.found, cacheOne.disabled || cacheOne.archived); + icon = cgBase.getMarkerIcon(true, cacheOne.type, cacheOne.own, cacheOne.found, cacheOne.disabled || cacheOne.archived); pin = null; if (iconsCache.containsKey(icon)) { @@ -1324,7 +1324,7 @@ public class cgeomap extends MapBase { coordinates.add(coord); item = settings.getMapFactory().getCacheOverlayItem(coord, null); - icon = cgBase.getIcon(false, oneWaypoint.type, false, false, false); + icon = cgBase.getMarkerIcon(false, oneWaypoint.type, false, false, false); if (iconsCache.containsKey(icon)) { pin = iconsCache.get(icon); } else { @@ -1480,7 +1480,7 @@ public class cgeomap extends MapBase { coordinates.add(coord); CacheOverlayItemImpl item = settings.getMapFactory().getCacheOverlayItem(coord, null); - final int icon = cgBase.getIcon(false, waypointTypeIntent, false, false, false); + final int icon = cgBase.getMarkerIcon(false, waypointTypeIntent, false, false, false); Drawable pin = null; if (iconsCache.containsKey(icon)) { pin = iconsCache.get(icon); |
