aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBananeweizen <Bananeweizen@gmx.de>2011-09-18 22:26:02 -0700
committerBananeweizen <Bananeweizen@gmx.de>2011-09-18 22:26:02 -0700
commit4016b1a154b44a49362b05cb99dcd8435fef014b (patch)
treee2d5fa179f0c0dd50848023e806837d5c0db248c
parent09ee4aa9429151b9b1e0fb30b27ec9c768fd08e1 (diff)
parent71f0cd005239a32d24870c339acbb93c7bf22508 (diff)
downloadcgeo-4016b1a154b44a49362b05cb99dcd8435fef014b.zip
cgeo-4016b1a154b44a49362b05cb99dcd8435fef014b.tar.gz
cgeo-4016b1a154b44a49362b05cb99dcd8435fef014b.tar.bz2
Merge pull request #504 from rsudev/refactor_maps_names
#179, Map refactor, renaming classes
-rw-r--r--main/AndroidManifest.xml4
-rw-r--r--main/res/layout/googlemap.xml2
-rw-r--r--main/res/layout/mfmap.xml2
-rw-r--r--main/src/cgeo/geocaching/cgSettings.java6
-rw-r--r--main/src/cgeo/geocaching/maps/AbstractItemizedOverlay.java (renamed from main/src/cgeo/geocaching/mapcommon/ItemizedOverlayBase.java)18
-rw-r--r--main/src/cgeo/geocaching/maps/AbstractMap.java (renamed from main/src/cgeo/geocaching/mapcommon/MapBase.java)10
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java (renamed from main/src/cgeo/geocaching/mapcommon/cgeomap.java)76
-rw-r--r--main/src/cgeo/geocaching/maps/CachesOverlay.java (renamed from main/src/cgeo/geocaching/mapcommon/cgMapOverlay.java)40
-rw-r--r--main/src/cgeo/geocaching/maps/OtherCachersOverlay.java (renamed from main/src/cgeo/geocaching/mapcommon/cgUsersOverlay.java)32
-rw-r--r--main/src/cgeo/geocaching/maps/PositionOverlay.java (renamed from main/src/cgeo/geocaching/mapcommon/cgMapMyOverlay.java)18
-rw-r--r--main/src/cgeo/geocaching/maps/ScaleOverlay.java (renamed from main/src/cgeo/geocaching/mapcommon/cgOverlayScale.java)16
-rw-r--r--main/src/cgeo/geocaching/maps/google/googleCacheOverlay.java (renamed from main/src/cgeo/geocaching/googlemaps/googleCacheOverlay.java)16
-rw-r--r--main/src/cgeo/geocaching/maps/google/googleCacheOverlayItem.java (renamed from main/src/cgeo/geocaching/googlemaps/googleCacheOverlayItem.java)6
-rw-r--r--main/src/cgeo/geocaching/maps/google/googleGeoPoint.java (renamed from main/src/cgeo/geocaching/googlemaps/googleGeoPoint.java)4
-rw-r--r--main/src/cgeo/geocaching/maps/google/googleMapActivity.java (renamed from main/src/cgeo/geocaching/googlemaps/googleMapActivity.java)14
-rw-r--r--main/src/cgeo/geocaching/maps/google/googleMapController.java (renamed from main/src/cgeo/geocaching/googlemaps/googleMapController.java)6
-rw-r--r--main/src/cgeo/geocaching/maps/google/googleMapFactory.java (renamed from main/src/cgeo/geocaching/googlemaps/googleMapFactory.java)16
-rw-r--r--main/src/cgeo/geocaching/maps/google/googleMapProjection.java (renamed from main/src/cgeo/geocaching/googlemaps/googleMapProjection.java)6
-rw-r--r--main/src/cgeo/geocaching/maps/google/googleMapView.java (renamed from main/src/cgeo/geocaching/googlemaps/googleMapView.java)42
-rw-r--r--main/src/cgeo/geocaching/maps/google/googleOtherCachersOverlay.java (renamed from main/src/cgeo/geocaching/googlemaps/googleUsersOverlay.java)24
-rw-r--r--main/src/cgeo/geocaching/maps/google/googleOtherCachersOverlayItem.java (renamed from main/src/cgeo/geocaching/googlemaps/googleUsersOverlayItem.java)8
-rw-r--r--main/src/cgeo/geocaching/maps/google/googleOverlay.java (renamed from main/src/cgeo/geocaching/googlemaps/googleOverlay.java)20
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/CachesOverlayItemImpl.java (renamed from main/src/cgeo/geocaching/mapinterfaces/CacheOverlayItemImpl.java)4
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/GeneralOverlay.java (renamed from main/src/cgeo/geocaching/mapinterfaces/OverlayBase.java)4
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/GeoPointImpl.java (renamed from main/src/cgeo/geocaching/mapinterfaces/GeoPointImpl.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/ItemizedOverlayImpl.java (renamed from main/src/cgeo/geocaching/mapinterfaces/ItemizedOverlayImpl.java)6
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/MapActivityImpl.java (renamed from main/src/cgeo/geocaching/mapinterfaces/ActivityImpl.java)4
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/MapControllerImpl.java (renamed from main/src/cgeo/geocaching/mapinterfaces/MapControllerImpl.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/MapFactory.java (renamed from main/src/cgeo/geocaching/mapinterfaces/MapFactory.java)6
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/MapProjectionImpl.java (renamed from main/src/cgeo/geocaching/mapinterfaces/MapProjectionImpl.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java (renamed from main/src/cgeo/geocaching/mapinterfaces/MapViewImpl.java)20
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/OnDragListener.java (renamed from main/src/cgeo/geocaching/mapinterfaces/OnDragListener.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/OtherCachersOverlayItemImpl.java (renamed from main/src/cgeo/geocaching/mapinterfaces/UserOverlayItemImpl.java)4
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/OverlayImpl.java (renamed from main/src/cgeo/geocaching/mapinterfaces/OverlayImpl.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/OverlayItemImpl.java (renamed from main/src/cgeo/geocaching/mapinterfaces/OverlayItemImpl.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/mfCacheOverlay.java (renamed from main/src/cgeo/geocaching/mapsforge/mfCacheOverlay.java)16
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/mfCacheOverlayItem.java (renamed from main/src/cgeo/geocaching/mapsforge/mfCacheOverlayItem.java)6
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/mfGeoPoint.java (renamed from main/src/cgeo/geocaching/mapsforge/mfGeoPoint.java)4
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/mfMapActivity.java (renamed from main/src/cgeo/geocaching/mapsforge/mfMapActivity.java)14
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/mfMapController.java (renamed from main/src/cgeo/geocaching/mapsforge/mfMapController.java)6
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/mfMapFactory.java (renamed from main/src/cgeo/geocaching/mapsforge/mfMapFactory.java)16
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/mfMapProjection.java (renamed from main/src/cgeo/geocaching/mapsforge/mfMapProjection.java)6
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/mfMapView.java (renamed from main/src/cgeo/geocaching/mapsforge/mfMapView.java)42
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/mfOtherCachersOverlay.java (renamed from main/src/cgeo/geocaching/mapsforge/mfUsersOverlay.java)24
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/mfOtherCachersOverlayItem.java (renamed from main/src/cgeo/geocaching/mapsforge/mfUsersOverlayItem.java)8
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/mfOverlay.java (renamed from main/src/cgeo/geocaching/mapsforge/mfOverlay.java)18
46 files changed, 303 insertions, 303 deletions
diff --git a/main/AndroidManifest.xml b/main/AndroidManifest.xml
index b8e98b5..4df025b 100644
--- a/main/AndroidManifest.xml
+++ b/main/AndroidManifest.xml
@@ -145,7 +145,7 @@
</intent-filter>
</activity>
<activity
- android:name="cgeo.geocaching.googlemaps.googleMapActivity"
+ android:name="cgeo.geocaching.maps.google.googleMapActivity"
android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation" >
<intent-filter>
@@ -153,7 +153,7 @@
</intent-filter>
</activity>
<activity
- android:name="cgeo.geocaching.mapsforge.mfMapActivity"
+ android:name="cgeo.geocaching.maps.mapsforge.mfMapActivity"
android:label="@string/app_name"
android:configChanges="keyboardHidden|orientation" >
<intent-filter>
diff --git a/main/res/layout/googlemap.xml b/main/res/layout/googlemap.xml
index 4689749..2305c05 100644
--- a/main/res/layout/googlemap.xml
+++ b/main/res/layout/googlemap.xml
@@ -38,7 +38,7 @@
android:textSize="12dip"
android:textColor="@color/text_icon"
android:background="@drawable/icon_bcg" />
- <view class="cgeo.geocaching.googlemaps.googleMapView" android:id="@+id/map"
+ <view class="cgeo.geocaching.maps.google.googleMapView" android:id="@+id/map"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:keepScreenOn="true"
diff --git a/main/res/layout/mfmap.xml b/main/res/layout/mfmap.xml
index 4c78a10..dd29270 100644
--- a/main/res/layout/mfmap.xml
+++ b/main/res/layout/mfmap.xml
@@ -38,7 +38,7 @@
android:textSize="12dip"
android:textColor="@color/text_icon"
android:background="@drawable/icon_bcg" />
- <view class="cgeo.geocaching.mapsforge.mfMapView" android:id="@+id/mfmap"
+ <view class="cgeo.geocaching.maps.mapsforge.mfMapView" android:id="@+id/mfmap"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:keepScreenOn="true"
diff --git a/main/src/cgeo/geocaching/cgSettings.java b/main/src/cgeo/geocaching/cgSettings.java
index 9fd4555..8c7c456 100644
--- a/main/src/cgeo/geocaching/cgSettings.java
+++ b/main/src/cgeo/geocaching/cgSettings.java
@@ -1,8 +1,8 @@
package cgeo.geocaching;
-import cgeo.geocaching.googlemaps.googleMapFactory;
-import cgeo.geocaching.mapinterfaces.MapFactory;
-import cgeo.geocaching.mapsforge.mfMapFactory;
+import cgeo.geocaching.maps.google.googleMapFactory;
+import cgeo.geocaching.maps.interfaces.MapFactory;
+import cgeo.geocaching.maps.mapsforge.mfMapFactory;
import org.apache.commons.lang3.StringUtils;
import org.mapsforge.android.maps.MapDatabase;
diff --git a/main/src/cgeo/geocaching/mapcommon/ItemizedOverlayBase.java b/main/src/cgeo/geocaching/maps/AbstractItemizedOverlay.java
index 355e78c..f1905a5 100644
--- a/main/src/cgeo/geocaching/mapcommon/ItemizedOverlayBase.java
+++ b/main/src/cgeo/geocaching/maps/AbstractItemizedOverlay.java
@@ -1,11 +1,11 @@
-package cgeo.geocaching.mapcommon;
+package cgeo.geocaching.maps;
-import cgeo.geocaching.mapinterfaces.ItemizedOverlayImpl;
-import cgeo.geocaching.mapinterfaces.MapProjectionImpl;
-import cgeo.geocaching.mapinterfaces.MapViewImpl;
-import cgeo.geocaching.mapinterfaces.OverlayBase;
-import cgeo.geocaching.mapinterfaces.OverlayImpl;
-import cgeo.geocaching.mapinterfaces.OverlayItemImpl;
+import cgeo.geocaching.maps.interfaces.ItemizedOverlayImpl;
+import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
+import cgeo.geocaching.maps.interfaces.MapViewImpl;
+import cgeo.geocaching.maps.interfaces.GeneralOverlay;
+import cgeo.geocaching.maps.interfaces.OverlayImpl;
+import cgeo.geocaching.maps.interfaces.OverlayItemImpl;
import android.graphics.Canvas;
import android.graphics.Point;
@@ -18,11 +18,11 @@ import android.graphics.drawable.Drawable;
* @author rsudev
*
*/
-public abstract class ItemizedOverlayBase implements OverlayBase {
+public abstract class AbstractItemizedOverlay implements GeneralOverlay {
private ItemizedOverlayImpl ovlImpl;
- protected ItemizedOverlayBase(ItemizedOverlayImpl ovlImplIn) {
+ protected AbstractItemizedOverlay(ItemizedOverlayImpl ovlImplIn) {
ovlImpl = ovlImplIn;
}
diff --git a/main/src/cgeo/geocaching/mapcommon/MapBase.java b/main/src/cgeo/geocaching/maps/AbstractMap.java
index 830c660..4fc99a5 100644
--- a/main/src/cgeo/geocaching/mapcommon/MapBase.java
+++ b/main/src/cgeo/geocaching/maps/AbstractMap.java
@@ -1,6 +1,6 @@
-package cgeo.geocaching.mapcommon;
+package cgeo.geocaching.maps;
-import cgeo.geocaching.mapinterfaces.ActivityImpl;
+import cgeo.geocaching.maps.interfaces.MapActivityImpl;
import android.app.Activity;
import android.content.res.Resources;
@@ -16,11 +16,11 @@ import android.view.View;
* @author rsudev
*
*/
-public abstract class MapBase {
+public abstract class AbstractMap {
- ActivityImpl mapActivity;
+ MapActivityImpl mapActivity;
- protected MapBase(ActivityImpl activity) {
+ protected AbstractMap(MapActivityImpl activity) {
mapActivity = activity;
}
diff --git a/main/src/cgeo/geocaching/mapcommon/cgeomap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index a185314..9797556 100644
--- a/main/src/cgeo/geocaching/mapcommon/cgeomap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.mapcommon;
+package cgeo.geocaching.maps;
import cgeo.geocaching.R;
import cgeo.geocaching.cgBase;
@@ -15,14 +15,14 @@ import cgeo.geocaching.cgeoapplication;
import cgeo.geocaching.activity.ActivityMixin;
import cgeo.geocaching.cgSettings.mapSourceEnum;
import cgeo.geocaching.geopoint.Geopoint;
-import cgeo.geocaching.mapinterfaces.ActivityImpl;
-import cgeo.geocaching.mapinterfaces.CacheOverlayItemImpl;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
-import cgeo.geocaching.mapinterfaces.MapControllerImpl;
-import cgeo.geocaching.mapinterfaces.MapFactory;
-import cgeo.geocaching.mapinterfaces.MapViewImpl;
-import cgeo.geocaching.mapinterfaces.OnDragListener;
-import cgeo.geocaching.mapinterfaces.UserOverlayItemImpl;
+import cgeo.geocaching.maps.interfaces.MapActivityImpl;
+import cgeo.geocaching.maps.interfaces.CachesOverlayItemImpl;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.MapControllerImpl;
+import cgeo.geocaching.maps.interfaces.MapFactory;
+import cgeo.geocaching.maps.interfaces.MapViewImpl;
+import cgeo.geocaching.maps.interfaces.OnDragListener;
+import cgeo.geocaching.maps.interfaces.OtherCachersOverlayItemImpl;
import org.apache.commons.lang3.StringUtils;
@@ -57,7 +57,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.UUID;
-public class cgeomap extends MapBase implements OnDragListener, ViewFactory {
+public class CGeoMap extends AbstractMap implements OnDragListener, ViewFactory {
private static final int MENU_SELECT_MAPVIEW = 1;
private static final int MENU_MAP_LIVE = 2;
@@ -118,10 +118,10 @@ public class cgeomap extends MapBase implements OnDragListener, ViewFactory {
private volatile long usersThreadRun = 0L;
private volatile boolean downloaded = false;
// overlays
- private cgMapOverlay overlayCaches = null;
- private cgUsersOverlay overlayUsers = null;
- private cgOverlayScale overlayScale = null;
- private cgMapMyOverlay overlayMyLoc = null;
+ private CachesOverlay overlayCaches = null;
+ private OtherCachersOverlay overlayOtherCachers = null;
+ private ScaleOverlay overlayScale = null;
+ private PositionOverlay overlayPosition = null;
// data for overlays
private int cachesCnt = 0;
private Map<Integer, Drawable> iconsCache = new HashMap<Integer, Drawable>();
@@ -231,7 +231,7 @@ public class cgeomap extends MapBase implements OnDragListener, ViewFactory {
}
};
- public cgeomap(ActivityImpl activity) {
+ public CGeoMap(MapActivityImpl activity) {
super(activity);
}
@@ -281,12 +281,12 @@ public class cgeomap extends MapBase implements OnDragListener, ViewFactory {
// initialize overlays
mapView.clearOverlays();
- if (overlayMyLoc == null) {
- overlayMyLoc = mapView.createAddPositionOverlay(activity, settings);
+ if (overlayPosition == null) {
+ overlayPosition = mapView.createAddPositionOverlay(activity, settings);
}
- if (settings.publicLoc > 0 && overlayUsers == null) {
- overlayUsers = mapView.createAddUsersOverlay(activity, getResources().getDrawable(R.drawable.user_location));
+ if (settings.publicLoc > 0 && overlayOtherCachers == null) {
+ overlayOtherCachers = mapView.createAddUsersOverlay(activity, getResources().getDrawable(R.drawable.user_location));
}
if (overlayCaches == null) {
@@ -776,12 +776,12 @@ public class cgeomap extends MapBase implements OnDragListener, ViewFactory {
try {
boolean repaintRequired = false;
- if (overlayMyLoc == null && mapView != null) {
- overlayMyLoc = mapView.createAddPositionOverlay(activity, settings);
+ if (overlayPosition == null && mapView != null) {
+ overlayPosition = mapView.createAddPositionOverlay(activity, settings);
}
- if (overlayMyLoc != null && geo.location != null) {
- overlayMyLoc.setCoordinates(geo.location);
+ if (overlayPosition != null && geo.location != null) {
+ overlayPosition.setCoordinates(geo.location);
}
if (geo.coordsNow != null) {
@@ -794,15 +794,15 @@ public class cgeomap extends MapBase implements OnDragListener, ViewFactory {
if (settings.useCompass == 0 || (geo.speedNow != null && geo.speedNow > 5)) { // use GPS when speed is higher than 18 km/h
if (geo.bearingNow != null) {
- overlayMyLoc.setHeading(geo.bearingNow);
+ overlayPosition.setHeading(geo.bearingNow);
} else {
- overlayMyLoc.setHeading(0f);
+ overlayPosition.setHeading(0f);
}
repaintRequired = true;
}
if (repaintRequired && mapView != null) {
- mapView.repaintRequired(overlayMyLoc);
+ mapView.repaintRequired(overlayPosition);
}
} catch (Exception e) {
@@ -820,8 +820,8 @@ public class cgeomap extends MapBase implements OnDragListener, ViewFactory {
return;
}
- if (overlayMyLoc != null && mapView != null && (geo == null || geo.speedNow == null || geo.speedNow <= 5)) { // use compass when speed is lower than 18 km/h
- overlayMyLoc.setHeading(dir.directionNow);
+ if (overlayPosition != null && mapView != null && (geo == null || geo.speedNow == null || geo.speedNow <= 5)) { // use compass when speed is lower than 18 km/h
+ overlayPosition.setHeading(dir.directionNow);
mapView.invalidate();
}
}
@@ -1276,12 +1276,12 @@ public class cgeomap extends MapBase implements OnDragListener, ViewFactory {
// display caches
final List<cgCache> cachesProtected = new ArrayList<cgCache>(caches);
- final List<CacheOverlayItemImpl> items = new ArrayList<CacheOverlayItemImpl>();
+ final List<CachesOverlayItemImpl> items = new ArrayList<CachesOverlayItemImpl>();
if (cachesProtected != null && !cachesProtected.isEmpty()) {
int icon = 0;
Drawable pin = null;
- CacheOverlayItemImpl item = null;
+ CachesOverlayItemImpl item = null;
for (cgCache cacheOne : cachesProtected) {
if (stop) {
@@ -1298,7 +1298,7 @@ public class cgeomap extends MapBase implements OnDragListener, ViewFactory {
final cgCoord coord = new cgCoord(cacheOne);
coordinates.add(coord);
- item = settings.getMapFactory().getCacheOverlayItem(coord, cacheOne.type);
+ item = settings.getMapFactory().getCachesOverlayItem(coord, cacheOne.type);
icon = cgBase.getMarkerIcon(true, cacheOne.type, cacheOne.own, cacheOne.found, cacheOne.disabled || cacheOne.archived);
pin = null;
@@ -1341,7 +1341,7 @@ public class cgeomap extends MapBase implements OnDragListener, ViewFactory {
cgCoord coord = new cgCoord(oneWaypoint);
coordinates.add(coord);
- item = settings.getMapFactory().getCacheOverlayItem(coord, null);
+ item = settings.getMapFactory().getCachesOverlayItem(coord, null);
icon = cgBase.getMarkerIcon(false, oneWaypoint.type, false, false, false);
if (iconsCache.containsKey(icon)) {
@@ -1449,10 +1449,10 @@ public class cgeomap extends MapBase implements OnDragListener, ViewFactory {
}
// display users
- List<UserOverlayItemImpl> items = new ArrayList<UserOverlayItemImpl>();
+ List<OtherCachersOverlayItemImpl> items = new ArrayList<OtherCachersOverlayItemImpl>();
int counter = 0;
- UserOverlayItemImpl item = null;
+ OtherCachersOverlayItemImpl item = null;
for (cgUser userOne : users) {
if (stop) {
@@ -1463,17 +1463,17 @@ public class cgeomap extends MapBase implements OnDragListener, ViewFactory {
continue;
}
- item = settings.getMapFactory().getUserOverlayItemBase(activity, userOne);
+ item = settings.getMapFactory().getOtherCachersOverlayItemBase(activity, userOne);
items.add(item);
counter++;
if ((counter % 10) == 0) {
- overlayUsers.updateItems(items);
+ overlayOtherCachers.updateItems(items);
displayHandler.sendEmptyMessage(1);
}
}
- overlayUsers.updateItems(items);
+ overlayOtherCachers.updateItems(items);
} finally {
working = false;
}
@@ -1496,7 +1496,7 @@ public class cgeomap extends MapBase implements OnDragListener, ViewFactory {
coord.name = "some place";
coordinates.add(coord);
- CacheOverlayItemImpl item = settings.getMapFactory().getCacheOverlayItem(coord, null);
+ CachesOverlayItemImpl item = settings.getMapFactory().getCachesOverlayItem(coord, null);
final int icon = cgBase.getMarkerIcon(false, waypointTypeIntent, false, false, false);
Drawable pin = null;
diff --git a/main/src/cgeo/geocaching/mapcommon/cgMapOverlay.java b/main/src/cgeo/geocaching/maps/CachesOverlay.java
index 1321fd2..cae4448 100644
--- a/main/src/cgeo/geocaching/mapcommon/cgMapOverlay.java
+++ b/main/src/cgeo/geocaching/maps/CachesOverlay.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.mapcommon;
+package cgeo.geocaching.maps;
import cgeo.geocaching.cgBase;
import cgeo.geocaching.cgCoord;
@@ -8,13 +8,13 @@ import cgeo.geocaching.cgeonavigate;
import cgeo.geocaching.cgeopopup;
import cgeo.geocaching.cgeowaypoint;
import cgeo.geocaching.geopoint.Geopoint;
-import cgeo.geocaching.mapinterfaces.CacheOverlayItemImpl;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
-import cgeo.geocaching.mapinterfaces.ItemizedOverlayImpl;
-import cgeo.geocaching.mapinterfaces.MapFactory;
-import cgeo.geocaching.mapinterfaces.MapProjectionImpl;
-import cgeo.geocaching.mapinterfaces.MapViewImpl;
-import cgeo.geocaching.mapinterfaces.OverlayBase;
+import cgeo.geocaching.maps.interfaces.CachesOverlayItemImpl;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.ItemizedOverlayImpl;
+import cgeo.geocaching.maps.interfaces.MapFactory;
+import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
+import cgeo.geocaching.maps.interfaces.MapViewImpl;
+import cgeo.geocaching.maps.interfaces.GeneralOverlay;
import org.apache.commons.lang3.StringUtils;
@@ -36,9 +36,9 @@ import android.util.Log;
import java.util.ArrayList;
import java.util.List;
-public class cgMapOverlay extends ItemizedOverlayBase implements OverlayBase {
+public class CachesOverlay extends AbstractItemizedOverlay implements GeneralOverlay {
- private List<CacheOverlayItemImpl> items = new ArrayList<CacheOverlayItemImpl>();
+ private List<CachesOverlayItemImpl> items = new ArrayList<CachesOverlayItemImpl>();
private Context context = null;
private Boolean fromDetail = false;
private boolean displayCircles = false;
@@ -51,7 +51,7 @@ public class cgMapOverlay extends ItemizedOverlayBase implements OverlayBase {
private cgSettings settings;
private MapFactory mapFactory = null;
- public cgMapOverlay(cgSettings settingsIn, ItemizedOverlayImpl ovlImpl, Context contextIn, Boolean fromDetailIn) {
+ public CachesOverlay(cgSettings settingsIn, ItemizedOverlayImpl ovlImpl, Context contextIn, Boolean fromDetailIn) {
super(ovlImpl);
populate();
@@ -63,26 +63,26 @@ public class cgMapOverlay extends ItemizedOverlayBase implements OverlayBase {
mapFactory = settings.getMapFactory();
}
- public void updateItems(CacheOverlayItemImpl item) {
- List<CacheOverlayItemImpl> itemsPre = new ArrayList<CacheOverlayItemImpl>();
+ public void updateItems(CachesOverlayItemImpl item) {
+ List<CachesOverlayItemImpl> itemsPre = new ArrayList<CachesOverlayItemImpl>();
itemsPre.add(item);
updateItems(itemsPre);
}
- public void updateItems(List<CacheOverlayItemImpl> itemsPre) {
+ public void updateItems(List<CachesOverlayItemImpl> itemsPre) {
if (itemsPre == null) {
return;
}
- for (CacheOverlayItemImpl item : itemsPre) {
+ for (CachesOverlayItemImpl item : itemsPre) {
item.setMarker(boundCenterBottom(item.getMarker(0)));
}
// ensure no interference between the draw and content changing routines
getOverlayImpl().lock();
try {
- items = new ArrayList<CacheOverlayItemImpl>(itemsPre);
+ items = new ArrayList<CachesOverlayItemImpl>(itemsPre);
setLastFocusedItemIndex(-1); // to reset tap during data change
populate();
@@ -137,7 +137,7 @@ public class cgMapOverlay extends ItemizedOverlayBase implements OverlayBase {
canvas.setDrawFilter(setfil);
- for (CacheOverlayItemImpl item : items) {
+ for (CachesOverlayItemImpl item : items) {
final cgCoord itemCoord = item.getCoord();
float[] result = new float[1];
@@ -192,7 +192,7 @@ public class cgMapOverlay extends ItemizedOverlayBase implements OverlayBase {
}
waitDialog.show();
- CacheOverlayItemImpl item = null;
+ CachesOverlayItemImpl item = null;
// prevent concurrent changes
getOverlayImpl().lock();
@@ -238,7 +238,7 @@ public class cgMapOverlay extends ItemizedOverlayBase implements OverlayBase {
}
@Override
- public CacheOverlayItemImpl createItem(int index) {
+ public CachesOverlayItemImpl createItem(int index) {
try {
return items.get(index);
} catch (Exception e) {
@@ -261,7 +261,7 @@ public class cgMapOverlay extends ItemizedOverlayBase implements OverlayBase {
public void infoDialog(int index) {
- final CacheOverlayItemImpl item = items.get(index);
+ final CachesOverlayItemImpl item = items.get(index);
final cgCoord coordinate = item.getCoord();
if (coordinate == null) {
diff --git a/main/src/cgeo/geocaching/mapcommon/cgUsersOverlay.java b/main/src/cgeo/geocaching/maps/OtherCachersOverlay.java
index 664a37d..4eff80b 100644
--- a/main/src/cgeo/geocaching/mapcommon/cgUsersOverlay.java
+++ b/main/src/cgeo/geocaching/maps/OtherCachersOverlay.java
@@ -1,14 +1,14 @@
-package cgeo.geocaching.mapcommon;
+package cgeo.geocaching.maps;
import cgeo.geocaching.R;
import cgeo.geocaching.cgSettings;
import cgeo.geocaching.cgUser;
import cgeo.geocaching.cgeodetail;
-import cgeo.geocaching.mapinterfaces.ItemizedOverlayImpl;
-import cgeo.geocaching.mapinterfaces.MapProjectionImpl;
-import cgeo.geocaching.mapinterfaces.MapViewImpl;
-import cgeo.geocaching.mapinterfaces.OverlayBase;
-import cgeo.geocaching.mapinterfaces.UserOverlayItemImpl;
+import cgeo.geocaching.maps.interfaces.ItemizedOverlayImpl;
+import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
+import cgeo.geocaching.maps.interfaces.MapViewImpl;
+import cgeo.geocaching.maps.interfaces.GeneralOverlay;
+import cgeo.geocaching.maps.interfaces.OtherCachersOverlayItemImpl;
import org.apache.commons.lang3.StringUtils;
@@ -25,39 +25,39 @@ import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-public class cgUsersOverlay extends ItemizedOverlayBase implements OverlayBase {
+public class OtherCachersOverlay extends AbstractItemizedOverlay implements GeneralOverlay {
- private List<UserOverlayItemImpl> items = new ArrayList<UserOverlayItemImpl>();
+ private List<OtherCachersOverlayItemImpl> items = new ArrayList<OtherCachersOverlayItemImpl>();
private Context context = null;
private final Pattern patternGeocode = Pattern.compile("^(GC[A-Z0-9]+)(\\: ?(.+))?$", Pattern.CASE_INSENSITIVE);
- public cgUsersOverlay(ItemizedOverlayImpl ovlImplIn, Context contextIn) {
+ public OtherCachersOverlay(ItemizedOverlayImpl ovlImplIn, Context contextIn) {
super(ovlImplIn);
populate();
context = contextIn;
}
- protected void updateItems(UserOverlayItemImpl item) {
- List<UserOverlayItemImpl> itemsPre = new ArrayList<UserOverlayItemImpl>();
+ protected void updateItems(OtherCachersOverlayItemImpl item) {
+ List<OtherCachersOverlayItemImpl> itemsPre = new ArrayList<OtherCachersOverlayItemImpl>();
itemsPre.add(item);
updateItems(itemsPre);
}
- public void updateItems(List<UserOverlayItemImpl> itemsPre) {
+ public void updateItems(List<OtherCachersOverlayItemImpl> itemsPre) {
if (itemsPre == null) {
return;
}
- for (UserOverlayItemImpl item : itemsPre) {
+ for (OtherCachersOverlayItemImpl item : itemsPre) {
item.setMarker(boundCenter(item.getMarker(0)));
}
items.clear();
if (itemsPre.size() > 0) {
- items = new ArrayList<UserOverlayItemImpl>(itemsPre);
+ items = new ArrayList<OtherCachersOverlayItemImpl>(itemsPre);
}
setLastFocusedItemIndex(-1); // to reset tap during data change
@@ -71,7 +71,7 @@ public class cgUsersOverlay extends ItemizedOverlayBase implements OverlayBase {
return false;
}
- final UserOverlayItemImpl item = items.get(index);
+ final OtherCachersOverlayItemImpl item = items.get(index);
final cgUser user = item.getUser();
// set action
@@ -146,7 +146,7 @@ public class cgUsersOverlay extends ItemizedOverlayBase implements OverlayBase {
}
@Override
- public UserOverlayItemImpl createItem(int index) {
+ public OtherCachersOverlayItemImpl createItem(int index) {
try {
return items.get(index);
} catch (Exception e) {
diff --git a/main/src/cgeo/geocaching/mapcommon/cgMapMyOverlay.java b/main/src/cgeo/geocaching/maps/PositionOverlay.java
index dba8ba6..8099400 100644
--- a/main/src/cgeo/geocaching/mapcommon/cgMapMyOverlay.java
+++ b/main/src/cgeo/geocaching/maps/PositionOverlay.java
@@ -1,14 +1,14 @@
-package cgeo.geocaching.mapcommon;
+package cgeo.geocaching.maps;
import cgeo.geocaching.R;
import cgeo.geocaching.cgSettings;
import cgeo.geocaching.geopoint.Geopoint;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
-import cgeo.geocaching.mapinterfaces.MapFactory;
-import cgeo.geocaching.mapinterfaces.MapProjectionImpl;
-import cgeo.geocaching.mapinterfaces.MapViewImpl;
-import cgeo.geocaching.mapinterfaces.OverlayBase;
-import cgeo.geocaching.mapinterfaces.OverlayImpl;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.MapFactory;
+import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
+import cgeo.geocaching.maps.interfaces.MapViewImpl;
+import cgeo.geocaching.maps.interfaces.GeneralOverlay;
+import cgeo.geocaching.maps.interfaces.OverlayImpl;
import android.app.Activity;
import android.graphics.Bitmap;
@@ -24,7 +24,7 @@ import android.location.Location;
import java.util.ArrayList;
import java.util.List;
-public class cgMapMyOverlay implements OverlayBase {
+public class PositionOverlay implements GeneralOverlay {
private cgSettings settings = null;
private Location coordinates = null;
private GeoPointImpl location = null;
@@ -47,7 +47,7 @@ public class cgMapMyOverlay implements OverlayBase {
private MapFactory mapFactory = null;
private OverlayImpl ovlImpl = null;
- public cgMapMyOverlay(cgSettings settingsIn, Activity activity, OverlayImpl ovlImpl) {
+ public PositionOverlay(cgSettings settingsIn, Activity activity, OverlayImpl ovlImpl) {
settings = settingsIn;
this.activity = activity;
this.mapFactory = settings.getMapFactory();
diff --git a/main/src/cgeo/geocaching/mapcommon/cgOverlayScale.java b/main/src/cgeo/geocaching/maps/ScaleOverlay.java
index 7c689a3..d958597 100644
--- a/main/src/cgeo/geocaching/mapcommon/cgOverlayScale.java
+++ b/main/src/cgeo/geocaching/maps/ScaleOverlay.java
@@ -1,14 +1,14 @@
-package cgeo.geocaching.mapcommon;
+package cgeo.geocaching.maps;
import cgeo.geocaching.cgBase;
import cgeo.geocaching.cgSettings;
import cgeo.geocaching.cgSettings.mapSourceEnum;
import cgeo.geocaching.geopoint.Geopoint;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
-import cgeo.geocaching.mapinterfaces.MapProjectionImpl;
-import cgeo.geocaching.mapinterfaces.MapViewImpl;
-import cgeo.geocaching.mapinterfaces.OverlayBase;
-import cgeo.geocaching.mapinterfaces.OverlayImpl;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
+import cgeo.geocaching.maps.interfaces.MapViewImpl;
+import cgeo.geocaching.maps.interfaces.GeneralOverlay;
+import cgeo.geocaching.maps.interfaces.OverlayImpl;
import android.app.Activity;
import android.graphics.BlurMaskFilter;
@@ -18,7 +18,7 @@ import android.graphics.Point;
import android.graphics.Typeface;
import android.util.DisplayMetrics;
-public class cgOverlayScale implements OverlayBase {
+public class ScaleOverlay implements GeneralOverlay {
private cgSettings settings = null;
private Paint scale = null;
private Paint scaleShadow = null;
@@ -31,7 +31,7 @@ public class cgOverlayScale implements OverlayBase {
private String units = null;
private OverlayImpl ovlImpl = null;
- public cgOverlayScale(Activity activity, cgSettings settingsIn, OverlayImpl overlayImpl) {
+ public ScaleOverlay(Activity activity, cgSettings settingsIn, OverlayImpl overlayImpl) {
settings = settingsIn;
this.ovlImpl = overlayImpl;
diff --git a/main/src/cgeo/geocaching/googlemaps/googleCacheOverlay.java b/main/src/cgeo/geocaching/maps/google/googleCacheOverlay.java
index bcf9733..b175842 100644
--- a/main/src/cgeo/geocaching/googlemaps/googleCacheOverlay.java
+++ b/main/src/cgeo/geocaching/maps/google/googleCacheOverlay.java
@@ -1,10 +1,10 @@
-package cgeo.geocaching.googlemaps;
+package cgeo.geocaching.maps.google;
import cgeo.geocaching.cgSettings;
-import cgeo.geocaching.mapcommon.cgMapOverlay;
-import cgeo.geocaching.mapinterfaces.ItemizedOverlayImpl;
-import cgeo.geocaching.mapinterfaces.MapProjectionImpl;
-import cgeo.geocaching.mapinterfaces.MapViewImpl;
+import cgeo.geocaching.maps.CachesOverlay;
+import cgeo.geocaching.maps.interfaces.ItemizedOverlayImpl;
+import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
+import cgeo.geocaching.maps.interfaces.MapViewImpl;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.MapView;
@@ -25,16 +25,16 @@ import java.util.concurrent.locks.ReentrantLock;
*/
public class googleCacheOverlay extends ItemizedOverlay<googleCacheOverlayItem> implements ItemizedOverlayImpl {
- private cgMapOverlay base;
+ private CachesOverlay base;
private Lock lock = new ReentrantLock();
public googleCacheOverlay(cgSettings settingsIn, Context contextIn, Drawable markerIn, Boolean fromDetailIn) {
super(boundCenterBottom(markerIn));
- base = new cgMapOverlay(settingsIn, this, contextIn, fromDetailIn);
+ base = new CachesOverlay(settingsIn, this, contextIn, fromDetailIn);
}
@Override
- public cgMapOverlay getBase() {
+ public CachesOverlay getBase() {
return base;
}
diff --git a/main/src/cgeo/geocaching/googlemaps/googleCacheOverlayItem.java b/main/src/cgeo/geocaching/maps/google/googleCacheOverlayItem.java
index 4bc7671..001dab9 100644
--- a/main/src/cgeo/geocaching/googlemaps/googleCacheOverlayItem.java
+++ b/main/src/cgeo/geocaching/maps/google/googleCacheOverlayItem.java
@@ -1,12 +1,12 @@
-package cgeo.geocaching.googlemaps;
+package cgeo.geocaching.maps.google;
import cgeo.geocaching.cgCoord;
-import cgeo.geocaching.mapinterfaces.CacheOverlayItemImpl;
+import cgeo.geocaching.maps.interfaces.CachesOverlayItemImpl;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.OverlayItem;
-public class googleCacheOverlayItem extends OverlayItem implements CacheOverlayItemImpl {
+public class googleCacheOverlayItem extends OverlayItem implements CachesOverlayItemImpl {
private String cacheType = null;
private cgCoord coord;
diff --git a/main/src/cgeo/geocaching/googlemaps/googleGeoPoint.java b/main/src/cgeo/geocaching/maps/google/googleGeoPoint.java
index 2c72d60..18cca20 100644
--- a/main/src/cgeo/geocaching/googlemaps/googleGeoPoint.java
+++ b/main/src/cgeo/geocaching/maps/google/googleGeoPoint.java
@@ -1,6 +1,6 @@
-package cgeo.geocaching.googlemaps;
+package cgeo.geocaching.maps.google;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
import com.google.android.maps.GeoPoint;
diff --git a/main/src/cgeo/geocaching/googlemaps/googleMapActivity.java b/main/src/cgeo/geocaching/maps/google/googleMapActivity.java
index 6c60a9a..a094064 100644
--- a/main/src/cgeo/geocaching/googlemaps/googleMapActivity.java
+++ b/main/src/cgeo/geocaching/maps/google/googleMapActivity.java
@@ -1,8 +1,8 @@
-package cgeo.geocaching.googlemaps;
+package cgeo.geocaching.maps.google;
-import cgeo.geocaching.mapcommon.MapBase;
-import cgeo.geocaching.mapcommon.cgeomap;
-import cgeo.geocaching.mapinterfaces.ActivityImpl;
+import cgeo.geocaching.maps.AbstractMap;
+import cgeo.geocaching.maps.CGeoMap;
+import cgeo.geocaching.maps.interfaces.MapActivityImpl;
import com.google.android.maps.MapActivity;
@@ -12,12 +12,12 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
-public class googleMapActivity extends MapActivity implements ActivityImpl {
+public class googleMapActivity extends MapActivity implements MapActivityImpl {
- private MapBase mapBase;
+ private AbstractMap mapBase;
public googleMapActivity() {
- mapBase = new cgeomap(this);
+ mapBase = new CGeoMap(this);
}
@Override
diff --git a/main/src/cgeo/geocaching/googlemaps/googleMapController.java b/main/src/cgeo/geocaching/maps/google/googleMapController.java
index fd413f8..cc607cc 100644
--- a/main/src/cgeo/geocaching/googlemaps/googleMapController.java
+++ b/main/src/cgeo/geocaching/maps/google/googleMapController.java
@@ -1,7 +1,7 @@
-package cgeo.geocaching.googlemaps;
+package cgeo.geocaching.maps.google;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
-import cgeo.geocaching.mapinterfaces.MapControllerImpl;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.MapControllerImpl;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapController;
diff --git a/main/src/cgeo/geocaching/googlemaps/googleMapFactory.java b/main/src/cgeo/geocaching/maps/google/googleMapFactory.java
index 890f638..c7eb33e 100644
--- a/main/src/cgeo/geocaching/googlemaps/googleMapFactory.java
+++ b/main/src/cgeo/geocaching/maps/google/googleMapFactory.java
@@ -1,13 +1,13 @@
-package cgeo.geocaching.googlemaps;
+package cgeo.geocaching.maps.google;
import cgeo.geocaching.R;
import cgeo.geocaching.cgCoord;
import cgeo.geocaching.cgUser;
import cgeo.geocaching.geopoint.Geopoint;
-import cgeo.geocaching.mapinterfaces.CacheOverlayItemImpl;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
-import cgeo.geocaching.mapinterfaces.MapFactory;
-import cgeo.geocaching.mapinterfaces.UserOverlayItemImpl;
+import cgeo.geocaching.maps.interfaces.CachesOverlayItemImpl;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.MapFactory;
+import cgeo.geocaching.maps.interfaces.OtherCachersOverlayItemImpl;
import com.google.android.maps.MapActivity;
@@ -36,14 +36,14 @@ public class googleMapFactory implements MapFactory {
}
@Override
- public CacheOverlayItemImpl getCacheOverlayItem(cgCoord coordinate, String type) {
+ public CachesOverlayItemImpl getCachesOverlayItem(cgCoord coordinate, String type) {
googleCacheOverlayItem baseItem = new googleCacheOverlayItem(coordinate, type);
return baseItem;
}
@Override
- public UserOverlayItemImpl getUserOverlayItemBase(Context context, cgUser userOne) {
- googleUsersOverlayItem baseItem = new googleUsersOverlayItem(context, userOne);
+ public OtherCachersOverlayItemImpl getOtherCachersOverlayItemBase(Context context, cgUser userOne) {
+ googleOtherCachersOverlayItem baseItem = new googleOtherCachersOverlayItem(context, userOne);
return baseItem;
}
diff --git a/main/src/cgeo/geocaching/googlemaps/googleMapProjection.java b/main/src/cgeo/geocaching/maps/google/googleMapProjection.java
index ea4b97c..761f509 100644
--- a/main/src/cgeo/geocaching/googlemaps/googleMapProjection.java
+++ b/main/src/cgeo/geocaching/maps/google/googleMapProjection.java
@@ -1,7 +1,7 @@
-package cgeo.geocaching.googlemaps;
+package cgeo.geocaching.maps.google;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
-import cgeo.geocaching.mapinterfaces.MapProjectionImpl;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.Projection;
diff --git a/main/src/cgeo/geocaching/googlemaps/googleMapView.java b/main/src/cgeo/geocaching/maps/google/googleMapView.java
index 57defbe..5b07cdf 100644
--- a/main/src/cgeo/geocaching/googlemaps/googleMapView.java
+++ b/main/src/cgeo/geocaching/maps/google/googleMapView.java
@@ -1,18 +1,18 @@
-package cgeo.geocaching.googlemaps;
+package cgeo.geocaching.maps.google;
import cgeo.geocaching.cgSettings;
-import cgeo.geocaching.mapcommon.cgMapMyOverlay;
-import cgeo.geocaching.mapcommon.cgMapOverlay;
-import cgeo.geocaching.mapcommon.cgOverlayScale;
-import cgeo.geocaching.mapcommon.cgUsersOverlay;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
-import cgeo.geocaching.mapinterfaces.MapControllerImpl;
-import cgeo.geocaching.mapinterfaces.MapProjectionImpl;
-import cgeo.geocaching.mapinterfaces.MapViewImpl;
-import cgeo.geocaching.mapinterfaces.OnDragListener;
-import cgeo.geocaching.mapinterfaces.OverlayBase;
-import cgeo.geocaching.mapinterfaces.OverlayImpl;
-import cgeo.geocaching.mapinterfaces.OverlayImpl.overlayType;
+import cgeo.geocaching.maps.PositionOverlay;
+import cgeo.geocaching.maps.CachesOverlay;
+import cgeo.geocaching.maps.ScaleOverlay;
+import cgeo.geocaching.maps.OtherCachersOverlay;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.MapControllerImpl;
+import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
+import cgeo.geocaching.maps.interfaces.MapViewImpl;
+import cgeo.geocaching.maps.interfaces.OnDragListener;
+import cgeo.geocaching.maps.interfaces.GeneralOverlay;
+import cgeo.geocaching.maps.interfaces.OverlayImpl;
+import cgeo.geocaching.maps.interfaces.OverlayImpl.overlayType;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapView;
@@ -96,7 +96,7 @@ public class googleMapView extends MapView implements MapViewImpl {
}
@Override
- public cgMapOverlay createAddMapOverlay(cgSettings settings,
+ public CachesOverlay createAddMapOverlay(cgSettings settings,
Context context, Drawable drawable, boolean fromDetailIntent) {
googleCacheOverlay ovl = new googleCacheOverlay(settings, context, drawable, fromDetailIntent);
@@ -105,28 +105,28 @@ public class googleMapView extends MapView implements MapViewImpl {
}
@Override
- public cgUsersOverlay createAddUsersOverlay(Context context, Drawable markerIn) {
- googleUsersOverlay ovl = new googleUsersOverlay(context, markerIn);
+ public OtherCachersOverlay createAddUsersOverlay(Context context, Drawable markerIn) {
+ googleOtherCachersOverlay ovl = new googleOtherCachersOverlay(context, markerIn);
getOverlays().add(ovl);
return ovl.getBase();
}
@Override
- public cgMapMyOverlay createAddPositionOverlay(Activity activity,
+ public PositionOverlay createAddPositionOverlay(Activity activity,
cgSettings settingsIn) {
googleOverlay ovl = new googleOverlay(activity, settingsIn, overlayType.PositionOverlay);
getOverlays().add(ovl);
- return (cgMapMyOverlay) ovl.getBase();
+ return (PositionOverlay) ovl.getBase();
}
@Override
- public cgOverlayScale createAddScaleOverlay(Activity activity,
+ public ScaleOverlay createAddScaleOverlay(Activity activity,
cgSettings settingsIn) {
googleOverlay ovl = new googleOverlay(activity, settingsIn, overlayType.ScaleOverlay);
getOverlays().add(ovl);
- return (cgOverlayScale) ovl.getBase();
+ return (ScaleOverlay) ovl.getBase();
}
@Override
@@ -157,7 +157,7 @@ public class googleMapView extends MapView implements MapViewImpl {
}
@Override
- public void repaintRequired(OverlayBase overlay) {
+ public void repaintRequired(GeneralOverlay overlay) {
invalidate();
}
diff --git a/main/src/cgeo/geocaching/googlemaps/googleUsersOverlay.java b/main/src/cgeo/geocaching/maps/google/googleOtherCachersOverlay.java
index 43b2a3c..11df0b7 100644
--- a/main/src/cgeo/geocaching/googlemaps/googleUsersOverlay.java
+++ b/main/src/cgeo/geocaching/maps/google/googleOtherCachersOverlay.java
@@ -1,9 +1,9 @@
-package cgeo.geocaching.googlemaps;
+package cgeo.geocaching.maps.google;
-import cgeo.geocaching.mapcommon.cgUsersOverlay;
-import cgeo.geocaching.mapinterfaces.ItemizedOverlayImpl;
-import cgeo.geocaching.mapinterfaces.MapProjectionImpl;
-import cgeo.geocaching.mapinterfaces.MapViewImpl;
+import cgeo.geocaching.maps.OtherCachersOverlay;
+import cgeo.geocaching.maps.interfaces.ItemizedOverlayImpl;
+import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
+import cgeo.geocaching.maps.interfaces.MapViewImpl;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.MapView;
@@ -16,27 +16,27 @@ import android.graphics.drawable.Drawable;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
-public class googleUsersOverlay extends ItemizedOverlay<googleUsersOverlayItem> implements ItemizedOverlayImpl {
+public class googleOtherCachersOverlay extends ItemizedOverlay<googleOtherCachersOverlayItem> implements ItemizedOverlayImpl {
- private cgUsersOverlay base;
+ private OtherCachersOverlay base;
private Lock lock = new ReentrantLock();
- public googleUsersOverlay(Context contextIn, Drawable markerIn) {
+ public googleOtherCachersOverlay(Context contextIn, Drawable markerIn) {
super(boundCenter(markerIn));
- base = new cgUsersOverlay(this, contextIn);
+ base = new OtherCachersOverlay(this, contextIn);
}
@Override
- public cgUsersOverlay getBase() {
+ public OtherCachersOverlay getBase() {
return base;
}
@Override
- protected googleUsersOverlayItem createItem(int i) {
+ protected googleOtherCachersOverlayItem createItem(int i) {
if (base == null)
return null;
- return (googleUsersOverlayItem) base.createItem(i);
+ return (googleOtherCachersOverlayItem) base.createItem(i);
}
@Override
diff --git a/main/src/cgeo/geocaching/googlemaps/googleUsersOverlayItem.java b/main/src/cgeo/geocaching/maps/google/googleOtherCachersOverlayItem.java
index 915f291..d1aa635 100644
--- a/main/src/cgeo/geocaching/googlemaps/googleUsersOverlayItem.java
+++ b/main/src/cgeo/geocaching/maps/google/googleOtherCachersOverlayItem.java
@@ -1,8 +1,8 @@
-package cgeo.geocaching.googlemaps;
+package cgeo.geocaching.maps.google;
import cgeo.geocaching.R;
import cgeo.geocaching.cgUser;
-import cgeo.geocaching.mapinterfaces.UserOverlayItemImpl;
+import cgeo.geocaching.maps.interfaces.OtherCachersOverlayItemImpl;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.OverlayItem;
@@ -10,11 +10,11 @@ import com.google.android.maps.OverlayItem;
import android.content.Context;
import android.graphics.drawable.Drawable;
-public class googleUsersOverlayItem extends OverlayItem implements UserOverlayItemImpl {
+public class googleOtherCachersOverlayItem extends OverlayItem implements OtherCachersOverlayItemImpl {
private Context context = null;
private cgUser user = null;
- public googleUsersOverlayItem(Context contextIn, cgUser userIn) {
+ public googleOtherCachersOverlayItem(Context contextIn, cgUser userIn) {
super(new GeoPoint(userIn.coords.getLatitudeE6(), userIn.coords.getLongitudeE6()), userIn.username, "");
context = contextIn;
diff --git a/main/src/cgeo/geocaching/googlemaps/googleOverlay.java b/main/src/cgeo/geocaching/maps/google/googleOverlay.java
index b47824e..1d7eb1c 100644
--- a/main/src/cgeo/geocaching/googlemaps/googleOverlay.java
+++ b/main/src/cgeo/geocaching/maps/google/googleOverlay.java
@@ -1,11 +1,11 @@
-package cgeo.geocaching.googlemaps;
+package cgeo.geocaching.maps.google;
import cgeo.geocaching.cgSettings;
-import cgeo.geocaching.mapcommon.cgMapMyOverlay;
-import cgeo.geocaching.mapcommon.cgOverlayScale;
-import cgeo.geocaching.mapinterfaces.MapViewImpl;
-import cgeo.geocaching.mapinterfaces.OverlayBase;
-import cgeo.geocaching.mapinterfaces.OverlayImpl;
+import cgeo.geocaching.maps.PositionOverlay;
+import cgeo.geocaching.maps.ScaleOverlay;
+import cgeo.geocaching.maps.interfaces.MapViewImpl;
+import cgeo.geocaching.maps.interfaces.GeneralOverlay;
+import cgeo.geocaching.maps.interfaces.OverlayImpl;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
@@ -18,16 +18,16 @@ import java.util.concurrent.locks.ReentrantLock;
public class googleOverlay extends Overlay implements OverlayImpl {
- private OverlayBase overlayBase = null;
+ private GeneralOverlay overlayBase = null;
private Lock lock = new ReentrantLock();
public googleOverlay(Activity activityIn, cgSettings settingsIn, overlayType ovlType) {
switch (ovlType) {
case PositionOverlay:
- overlayBase = new cgMapMyOverlay(settingsIn, activityIn, this);
+ overlayBase = new PositionOverlay(settingsIn, activityIn, this);
break;
case ScaleOverlay:
- overlayBase = new cgOverlayScale(activityIn, settingsIn, this);
+ overlayBase = new ScaleOverlay(activityIn, settingsIn, this);
}
}
@@ -40,7 +40,7 @@ public class googleOverlay extends Overlay implements OverlayImpl {
}
}
- public OverlayBase getBase() {
+ public GeneralOverlay getBase() {
return overlayBase;
}
diff --git a/main/src/cgeo/geocaching/mapinterfaces/CacheOverlayItemImpl.java b/main/src/cgeo/geocaching/maps/interfaces/CachesOverlayItemImpl.java
index df74a4c..59e79a0 100644
--- a/main/src/cgeo/geocaching/mapinterfaces/CacheOverlayItemImpl.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/CachesOverlayItemImpl.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.mapinterfaces;
+package cgeo.geocaching.maps.interfaces;
import cgeo.geocaching.cgCoord;
@@ -9,7 +9,7 @@ import cgeo.geocaching.cgCoord;
* @author rsudev
*
*/
-public interface CacheOverlayItemImpl extends OverlayItemImpl {
+public interface CachesOverlayItemImpl extends OverlayItemImpl {
public cgCoord getCoord();
diff --git a/main/src/cgeo/geocaching/mapinterfaces/OverlayBase.java b/main/src/cgeo/geocaching/maps/interfaces/GeneralOverlay.java
index e544f0d..35d0b2d 100644
--- a/main/src/cgeo/geocaching/mapinterfaces/OverlayBase.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/GeneralOverlay.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.mapinterfaces;
+package cgeo.geocaching.maps.interfaces;
import android.graphics.Canvas;
import android.graphics.Point;
@@ -10,7 +10,7 @@ import android.graphics.Point;
* @author rsudev
*
*/
-public interface OverlayBase {
+public interface GeneralOverlay {
void draw(Canvas canvas, MapViewImpl mapView, boolean shadow);
diff --git a/main/src/cgeo/geocaching/mapinterfaces/GeoPointImpl.java b/main/src/cgeo/geocaching/maps/interfaces/GeoPointImpl.java
index 4142368..55f014b 100644
--- a/main/src/cgeo/geocaching/mapinterfaces/GeoPointImpl.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/GeoPointImpl.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.mapinterfaces;
+package cgeo.geocaching.maps.interfaces;
/**
* Defines the common functions of the provider-specific
diff --git a/main/src/cgeo/geocaching/mapinterfaces/ItemizedOverlayImpl.java b/main/src/cgeo/geocaching/maps/interfaces/ItemizedOverlayImpl.java
index b738e41..8f9dba2 100644
--- a/main/src/cgeo/geocaching/mapinterfaces/ItemizedOverlayImpl.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/ItemizedOverlayImpl.java
@@ -1,6 +1,6 @@
-package cgeo.geocaching.mapinterfaces;
+package cgeo.geocaching.maps.interfaces;
-import cgeo.geocaching.mapcommon.ItemizedOverlayBase;
+import cgeo.geocaching.maps.AbstractItemizedOverlay;
import android.graphics.Canvas;
import android.graphics.Point;
@@ -15,7 +15,7 @@ import android.graphics.drawable.Drawable;
*/
public interface ItemizedOverlayImpl extends OverlayImpl {
- ItemizedOverlayBase getBase();
+ AbstractItemizedOverlay getBase();
void superPopulate();
diff --git a/main/src/cgeo/geocaching/mapinterfaces/ActivityImpl.java b/main/src/cgeo/geocaching/maps/interfaces/MapActivityImpl.java
index 043ca59..ff7e338 100644
--- a/main/src/cgeo/geocaching/mapinterfaces/ActivityImpl.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/MapActivityImpl.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.mapinterfaces;
+package cgeo.geocaching.maps.interfaces;
import android.app.Activity;
import android.content.res.Resources;
@@ -14,7 +14,7 @@ import android.view.View;
* @author rsudev
*
*/
-public interface ActivityImpl {
+public interface MapActivityImpl {
Resources getResources();
diff --git a/main/src/cgeo/geocaching/mapinterfaces/MapControllerImpl.java b/main/src/cgeo/geocaching/maps/interfaces/MapControllerImpl.java
index 00e31d2..86a5800 100644
--- a/main/src/cgeo/geocaching/mapinterfaces/MapControllerImpl.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/MapControllerImpl.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.mapinterfaces;
+package cgeo.geocaching.maps.interfaces;
/**
* Defines the common functions of the provider-specific
diff --git a/main/src/cgeo/geocaching/mapinterfaces/MapFactory.java b/main/src/cgeo/geocaching/maps/interfaces/MapFactory.java
index 467947d..0e21f2a 100644
--- a/main/src/cgeo/geocaching/mapinterfaces/MapFactory.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/MapFactory.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.mapinterfaces;
+package cgeo.geocaching.maps.interfaces;
import cgeo.geocaching.cgCoord;
import cgeo.geocaching.cgUser;
@@ -24,9 +24,9 @@ public interface MapFactory {
public GeoPointImpl getGeoPointBase(final Geopoint coords);
- CacheOverlayItemImpl getCacheOverlayItem(cgCoord coordinate, String type);
+ CachesOverlayItemImpl getCachesOverlayItem(cgCoord coordinate, String type);
- public UserOverlayItemImpl getUserOverlayItemBase(Context context,
+ public OtherCachersOverlayItemImpl getOtherCachersOverlayItemBase(Context context,
cgUser userOne);
}
diff --git a/main/src/cgeo/geocaching/mapinterfaces/MapProjectionImpl.java b/main/src/cgeo/geocaching/maps/interfaces/MapProjectionImpl.java
index e3cc1fa..c7b6856 100644
--- a/main/src/cgeo/geocaching/mapinterfaces/MapProjectionImpl.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/MapProjectionImpl.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.mapinterfaces;
+package cgeo.geocaching.maps.interfaces;
import android.graphics.Point;
diff --git a/main/src/cgeo/geocaching/mapinterfaces/MapViewImpl.java b/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java
index 2cd016f..e13e2e9 100644
--- a/main/src/cgeo/geocaching/mapinterfaces/MapViewImpl.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java
@@ -1,10 +1,10 @@
-package cgeo.geocaching.mapinterfaces;
+package cgeo.geocaching.maps.interfaces;
import cgeo.geocaching.cgSettings;
-import cgeo.geocaching.mapcommon.cgMapMyOverlay;
-import cgeo.geocaching.mapcommon.cgMapOverlay;
-import cgeo.geocaching.mapcommon.cgOverlayScale;
-import cgeo.geocaching.mapcommon.cgUsersOverlay;
+import cgeo.geocaching.maps.PositionOverlay;
+import cgeo.geocaching.maps.CachesOverlay;
+import cgeo.geocaching.maps.ScaleOverlay;
+import cgeo.geocaching.maps.OtherCachersOverlay;
import android.app.Activity;
import android.content.Context;
@@ -51,14 +51,14 @@ public interface MapViewImpl {
Context getContext();
- cgMapOverlay createAddMapOverlay(cgSettings settings, Context context,
+ CachesOverlay createAddMapOverlay(cgSettings settings, Context context,
Drawable drawable, boolean fromDetailIntent);
- cgUsersOverlay createAddUsersOverlay(Context context, Drawable markerIn);
+ OtherCachersOverlay createAddUsersOverlay(Context context, Drawable markerIn);
- cgOverlayScale createAddScaleOverlay(Activity activity, cgSettings settingsIn);
+ ScaleOverlay createAddScaleOverlay(Activity activity, cgSettings settingsIn);
- cgMapMyOverlay createAddPositionOverlay(Activity activity, cgSettings settingsIn);
+ PositionOverlay createAddPositionOverlay(Activity activity, cgSettings settingsIn);
boolean needsScaleOverlay();
@@ -66,7 +66,7 @@ public interface MapViewImpl {
void setMapSource(cgSettings settings);
- void repaintRequired(OverlayBase overlay);
+ void repaintRequired(GeneralOverlay overlay);
void setOnDragListener(OnDragListener onDragListener);
}
diff --git a/main/src/cgeo/geocaching/mapinterfaces/OnDragListener.java b/main/src/cgeo/geocaching/maps/interfaces/OnDragListener.java
index 4ae2d41..285aafa 100644
--- a/main/src/cgeo/geocaching/mapinterfaces/OnDragListener.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/OnDragListener.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.mapinterfaces;
+package cgeo.geocaching.maps.interfaces;
/**
* Notifies the parent class when a MapView has been dragged
diff --git a/main/src/cgeo/geocaching/mapinterfaces/UserOverlayItemImpl.java b/main/src/cgeo/geocaching/maps/interfaces/OtherCachersOverlayItemImpl.java
index 3e552e8..43fc58e 100644
--- a/main/src/cgeo/geocaching/mapinterfaces/UserOverlayItemImpl.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/OtherCachersOverlayItemImpl.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.mapinterfaces;
+package cgeo.geocaching.maps.interfaces;
import cgeo.geocaching.cgUser;
@@ -9,7 +9,7 @@ import cgeo.geocaching.cgUser;
* @author rsudev
*
*/
-public interface UserOverlayItemImpl extends OverlayItemImpl {
+public interface OtherCachersOverlayItemImpl extends OverlayItemImpl {
public cgUser getUser();
}
diff --git a/main/src/cgeo/geocaching/mapinterfaces/OverlayImpl.java b/main/src/cgeo/geocaching/maps/interfaces/OverlayImpl.java
index ede6872..926873b 100644
--- a/main/src/cgeo/geocaching/mapinterfaces/OverlayImpl.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/OverlayImpl.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.mapinterfaces;
+package cgeo.geocaching.maps.interfaces;
/**
* Marker interface of the provider-specific
diff --git a/main/src/cgeo/geocaching/mapinterfaces/OverlayItemImpl.java b/main/src/cgeo/geocaching/maps/interfaces/OverlayItemImpl.java
index 3cc2061..1673da2 100644
--- a/main/src/cgeo/geocaching/mapinterfaces/OverlayItemImpl.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/OverlayItemImpl.java
@@ -1,4 +1,4 @@
-package cgeo.geocaching.mapinterfaces;
+package cgeo.geocaching.maps.interfaces;
import android.graphics.drawable.Drawable;
diff --git a/main/src/cgeo/geocaching/mapsforge/mfCacheOverlay.java b/main/src/cgeo/geocaching/maps/mapsforge/mfCacheOverlay.java
index 1bfc102..507f1e5 100644
--- a/main/src/cgeo/geocaching/mapsforge/mfCacheOverlay.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/mfCacheOverlay.java
@@ -1,10 +1,10 @@
-package cgeo.geocaching.mapsforge;
+package cgeo.geocaching.maps.mapsforge;
import cgeo.geocaching.cgSettings;
-import cgeo.geocaching.mapcommon.cgMapOverlay;
-import cgeo.geocaching.mapinterfaces.ItemizedOverlayImpl;
-import cgeo.geocaching.mapinterfaces.MapProjectionImpl;
-import cgeo.geocaching.mapinterfaces.MapViewImpl;
+import cgeo.geocaching.maps.CachesOverlay;
+import cgeo.geocaching.maps.interfaces.ItemizedOverlayImpl;
+import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
+import cgeo.geocaching.maps.interfaces.MapViewImpl;
import org.mapsforge.android.maps.ItemizedOverlay;
import org.mapsforge.android.maps.Projection;
@@ -19,16 +19,16 @@ import java.util.concurrent.locks.ReentrantLock;
public class mfCacheOverlay extends ItemizedOverlay<mfCacheOverlayItem> implements ItemizedOverlayImpl {
- private cgMapOverlay base;
+ private CachesOverlay base;
private Lock lock = new ReentrantLock();
public mfCacheOverlay(cgSettings settingsIn, Context contextIn, Drawable markerIn, Boolean fromDetailIn) {
super(boundCenterBottom(markerIn));
- base = new cgMapOverlay(settingsIn, this, contextIn, fromDetailIn);
+ base = new CachesOverlay(settingsIn, this, contextIn, fromDetailIn);
}
@Override
- public cgMapOverlay getBase() {
+ public CachesOverlay getBase() {
return base;
}
diff --git a/main/src/cgeo/geocaching/mapsforge/mfCacheOverlayItem.java b/main/src/cgeo/geocaching/maps/mapsforge/mfCacheOverlayItem.java
index 038b29b..b52ecd8 100644
--- a/main/src/cgeo/geocaching/mapsforge/mfCacheOverlayItem.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/mfCacheOverlayItem.java
@@ -1,14 +1,14 @@
-package cgeo.geocaching.mapsforge;
+package cgeo.geocaching.maps.mapsforge;
import cgeo.geocaching.cgCoord;
-import cgeo.geocaching.mapinterfaces.CacheOverlayItemImpl;
+import cgeo.geocaching.maps.interfaces.CachesOverlayItemImpl;
import org.mapsforge.android.maps.GeoPoint;
import org.mapsforge.android.maps.OverlayItem;
import android.graphics.drawable.Drawable;
-public class mfCacheOverlayItem extends OverlayItem implements CacheOverlayItemImpl {
+public class mfCacheOverlayItem extends OverlayItem implements CachesOverlayItemImpl {
private String cacheType = null;
private cgCoord coord;
diff --git a/main/src/cgeo/geocaching/mapsforge/mfGeoPoint.java b/main/src/cgeo/geocaching/maps/mapsforge/mfGeoPoint.java
index 905d3bf..0e47008 100644
--- a/main/src/cgeo/geocaching/mapsforge/mfGeoPoint.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/mfGeoPoint.java
@@ -1,6 +1,6 @@
-package cgeo.geocaching.mapsforge;
+package cgeo.geocaching.maps.mapsforge;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
import org.mapsforge.android.maps.GeoPoint;
diff --git a/main/src/cgeo/geocaching/mapsforge/mfMapActivity.java b/main/src/cgeo/geocaching/maps/mapsforge/mfMapActivity.java
index 79ff290..6c423b0 100644
--- a/main/src/cgeo/geocaching/mapsforge/mfMapActivity.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/mfMapActivity.java
@@ -1,8 +1,8 @@
-package cgeo.geocaching.mapsforge;
+package cgeo.geocaching.maps.mapsforge;
-import cgeo.geocaching.mapcommon.MapBase;
-import cgeo.geocaching.mapcommon.cgeomap;
-import cgeo.geocaching.mapinterfaces.ActivityImpl;
+import cgeo.geocaching.maps.AbstractMap;
+import cgeo.geocaching.maps.CGeoMap;
+import cgeo.geocaching.maps.interfaces.MapActivityImpl;
import org.mapsforge.android.maps.MapActivity;
@@ -12,12 +12,12 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
-public class mfMapActivity extends MapActivity implements ActivityImpl {
+public class mfMapActivity extends MapActivity implements MapActivityImpl {
- private MapBase mapBase;
+ private AbstractMap mapBase;
public mfMapActivity() {
- mapBase = new cgeomap(this);
+ mapBase = new CGeoMap(this);
}
@Override
diff --git a/main/src/cgeo/geocaching/mapsforge/mfMapController.java b/main/src/cgeo/geocaching/maps/mapsforge/mfMapController.java
index f31d9b2..da7d9be 100644
--- a/main/src/cgeo/geocaching/mapsforge/mfMapController.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/mfMapController.java
@@ -1,7 +1,7 @@
-package cgeo.geocaching.mapsforge;
+package cgeo.geocaching.maps.mapsforge;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
-import cgeo.geocaching.mapinterfaces.MapControllerImpl;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.MapControllerImpl;
import org.mapsforge.android.maps.GeoPoint;
import org.mapsforge.android.maps.MapController;
diff --git a/main/src/cgeo/geocaching/mapsforge/mfMapFactory.java b/main/src/cgeo/geocaching/maps/mapsforge/mfMapFactory.java
index 7e41951..d713b22 100644
--- a/main/src/cgeo/geocaching/mapsforge/mfMapFactory.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/mfMapFactory.java
@@ -1,13 +1,13 @@
-package cgeo.geocaching.mapsforge;
+package cgeo.geocaching.maps.mapsforge;
import cgeo.geocaching.R;
import cgeo.geocaching.cgCoord;
import cgeo.geocaching.cgUser;
import cgeo.geocaching.geopoint.Geopoint;
-import cgeo.geocaching.mapinterfaces.CacheOverlayItemImpl;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
-import cgeo.geocaching.mapinterfaces.MapFactory;
-import cgeo.geocaching.mapinterfaces.UserOverlayItemImpl;
+import cgeo.geocaching.maps.interfaces.CachesOverlayItemImpl;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.MapFactory;
+import cgeo.geocaching.maps.interfaces.OtherCachersOverlayItemImpl;
import android.app.Activity;
import android.content.Context;
@@ -35,14 +35,14 @@ public class mfMapFactory implements MapFactory {
}
@Override
- public CacheOverlayItemImpl getCacheOverlayItem(cgCoord coordinate, String type) {
+ public CachesOverlayItemImpl getCachesOverlayItem(cgCoord coordinate, String type) {
mfCacheOverlayItem baseItem = new mfCacheOverlayItem(coordinate, type);
return baseItem;
}
@Override
- public UserOverlayItemImpl getUserOverlayItemBase(Context context, cgUser userOne) {
- mfUsersOverlayItem baseItem = new mfUsersOverlayItem(context, userOne);
+ public OtherCachersOverlayItemImpl getOtherCachersOverlayItemBase(Context context, cgUser userOne) {
+ mfOtherCachersOverlayItem baseItem = new mfOtherCachersOverlayItem(context, userOne);
return baseItem;
}
diff --git a/main/src/cgeo/geocaching/mapsforge/mfMapProjection.java b/main/src/cgeo/geocaching/maps/mapsforge/mfMapProjection.java
index f3e6dc1..74a6c0b 100644
--- a/main/src/cgeo/geocaching/mapsforge/mfMapProjection.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/mfMapProjection.java
@@ -1,7 +1,7 @@
-package cgeo.geocaching.mapsforge;
+package cgeo.geocaching.maps.mapsforge;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
-import cgeo.geocaching.mapinterfaces.MapProjectionImpl;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
import org.mapsforge.android.maps.GeoPoint;
import org.mapsforge.android.maps.Projection;
diff --git a/main/src/cgeo/geocaching/mapsforge/mfMapView.java b/main/src/cgeo/geocaching/maps/mapsforge/mfMapView.java
index a4d1e40..6200079 100644
--- a/main/src/cgeo/geocaching/mapsforge/mfMapView.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/mfMapView.java
@@ -1,18 +1,18 @@
-package cgeo.geocaching.mapsforge;
+package cgeo.geocaching.maps.mapsforge;
import cgeo.geocaching.cgSettings;
-import cgeo.geocaching.mapcommon.cgMapMyOverlay;
-import cgeo.geocaching.mapcommon.cgMapOverlay;
-import cgeo.geocaching.mapcommon.cgOverlayScale;
-import cgeo.geocaching.mapcommon.cgUsersOverlay;
-import cgeo.geocaching.mapinterfaces.GeoPointImpl;
-import cgeo.geocaching.mapinterfaces.MapControllerImpl;
-import cgeo.geocaching.mapinterfaces.MapProjectionImpl;
-import cgeo.geocaching.mapinterfaces.MapViewImpl;
-import cgeo.geocaching.mapinterfaces.OnDragListener;
-import cgeo.geocaching.mapinterfaces.OverlayBase;
-import cgeo.geocaching.mapinterfaces.OverlayImpl;
-import cgeo.geocaching.mapinterfaces.OverlayImpl.overlayType;
+import cgeo.geocaching.maps.PositionOverlay;
+import cgeo.geocaching.maps.CachesOverlay;
+import cgeo.geocaching.maps.ScaleOverlay;
+import cgeo.geocaching.maps.OtherCachersOverlay;
+import cgeo.geocaching.maps.interfaces.GeoPointImpl;
+import cgeo.geocaching.maps.interfaces.MapControllerImpl;
+import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
+import cgeo.geocaching.maps.interfaces.MapViewImpl;
+import cgeo.geocaching.maps.interfaces.OnDragListener;
+import cgeo.geocaching.maps.interfaces.GeneralOverlay;
+import cgeo.geocaching.maps.interfaces.OverlayImpl;
+import cgeo.geocaching.maps.interfaces.OverlayImpl.overlayType;
import org.mapsforge.android.maps.GeoPoint;
import org.mapsforge.android.maps.MapDatabase;
@@ -85,7 +85,7 @@ public class mfMapView extends MapView implements MapViewImpl {
}
@Override
- public cgMapOverlay createAddMapOverlay(cgSettings settings,
+ public CachesOverlay createAddMapOverlay(cgSettings settings,
Context context, Drawable drawable, boolean fromDetailIntent) {
mfCacheOverlay ovl = new mfCacheOverlay(settings, context, drawable, fromDetailIntent);
@@ -94,26 +94,26 @@ public class mfMapView extends MapView implements MapViewImpl {
}
@Override
- public cgUsersOverlay createAddUsersOverlay(Context context, Drawable markerIn) {
- mfUsersOverlay ovl = new mfUsersOverlay(context, markerIn);
+ public OtherCachersOverlay createAddUsersOverlay(Context context, Drawable markerIn) {
+ mfOtherCachersOverlay ovl = new mfOtherCachersOverlay(context, markerIn);
getOverlays().add(ovl);
return ovl.getBase();
}
@Override
- public cgMapMyOverlay createAddPositionOverlay(Activity activity,
+ public PositionOverlay createAddPositionOverlay(Activity activity,
cgSettings settingsIn) {
mfOverlay ovl = new mfOverlay(activity, settingsIn, overlayType.PositionOverlay);
getOverlays().add(ovl);
- return (cgMapMyOverlay) ovl.getBase();
+ return (PositionOverlay) ovl.getBase();
}
@Override
- public cgOverlayScale createAddScaleOverlay(Activity activity,
+ public ScaleOverlay createAddScaleOverlay(Activity activity,
cgSettings settingsIn) {
mfOverlay ovl = new mfOverlay(activity, settingsIn, overlayType.ScaleOverlay);
getOverlays().add(ovl);
- return (cgOverlayScale) ovl.getBase();
+ return (ScaleOverlay) ovl.getBase();
}
@Override
@@ -199,7 +199,7 @@ public class mfMapView extends MapView implements MapViewImpl {
}
@Override
- public void repaintRequired(OverlayBase overlay) {
+ public void repaintRequired(GeneralOverlay overlay) {
try {
mfOverlay ovl = (mfOverlay) overlay.getOverlayImpl();
diff --git a/main/src/cgeo/geocaching/mapsforge/mfUsersOverlay.java b/main/src/cgeo/geocaching/maps/mapsforge/mfOtherCachersOverlay.java
index 06b9f3e..fc545cc 100644
--- a/main/src/cgeo/geocaching/mapsforge/mfUsersOverlay.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/mfOtherCachersOverlay.java
@@ -1,9 +1,9 @@
-package cgeo.geocaching.mapsforge;
+package cgeo.geocaching.maps.mapsforge;
-import cgeo.geocaching.mapcommon.cgUsersOverlay;
-import cgeo.geocaching.mapinterfaces.ItemizedOverlayImpl;
-import cgeo.geocaching.mapinterfaces.MapProjectionImpl;
-import cgeo.geocaching.mapinterfaces.MapViewImpl;
+import cgeo.geocaching.maps.OtherCachersOverlay;
+import cgeo.geocaching.maps.interfaces.ItemizedOverlayImpl;
+import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
+import cgeo.geocaching.maps.interfaces.MapViewImpl;
import org.mapsforge.android.maps.ItemizedOverlay;
import org.mapsforge.android.maps.Projection;
@@ -16,27 +16,27 @@ import android.graphics.drawable.Drawable;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
-public class mfUsersOverlay extends ItemizedOverlay<mfUsersOverlayItem> implements ItemizedOverlayImpl {
+public class mfOtherCachersOverlay extends ItemizedOverlay<mfOtherCachersOverlayItem> implements ItemizedOverlayImpl {
- private cgUsersOverlay base;
+ private OtherCachersOverlay base;
private Lock lock = new ReentrantLock();
- public mfUsersOverlay(Context contextIn, Drawable markerIn) {
+ public mfOtherCachersOverlay(Context contextIn, Drawable markerIn) {
super(boundCenter(markerIn));
- base = new cgUsersOverlay(this, contextIn);
+ base = new OtherCachersOverlay(this, contextIn);
}
@Override
- public cgUsersOverlay getBase() {
+ public OtherCachersOverlay getBase() {
return base;
}
@Override
- protected mfUsersOverlayItem createItem(int i) {
+ protected mfOtherCachersOverlayItem createItem(int i) {
if (base == null)
return null;
- return (mfUsersOverlayItem) base.createItem(i);
+ return (mfOtherCachersOverlayItem) base.createItem(i);
}
@Override
diff --git a/main/src/cgeo/geocaching/mapsforge/mfUsersOverlayItem.java b/main/src/cgeo/geocaching/maps/mapsforge/mfOtherCachersOverlayItem.java
index d53a863..4845425 100644
--- a/main/src/cgeo/geocaching/mapsforge/mfUsersOverlayItem.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/mfOtherCachersOverlayItem.java
@@ -1,8 +1,8 @@
-package cgeo.geocaching.mapsforge;
+package cgeo.geocaching.maps.mapsforge;
import cgeo.geocaching.R;
import cgeo.geocaching.cgUser;
-import cgeo.geocaching.mapinterfaces.UserOverlayItemImpl;
+import cgeo.geocaching.maps.interfaces.OtherCachersOverlayItemImpl;
import org.mapsforge.android.maps.GeoPoint;
import org.mapsforge.android.maps.OverlayItem;
@@ -10,11 +10,11 @@ import org.mapsforge.android.maps.OverlayItem;
import android.content.Context;
import android.graphics.drawable.Drawable;
-public class mfUsersOverlayItem extends OverlayItem implements UserOverlayItemImpl {
+public class mfOtherCachersOverlayItem extends OverlayItem implements OtherCachersOverlayItemImpl {
private Context context = null;
private cgUser user = null;
- public mfUsersOverlayItem(Context contextIn, cgUser userIn) {
+ public mfOtherCachersOverlayItem(Context contextIn, cgUser userIn) {
super(new GeoPoint((int) (userIn.coords.getLatitudeE6()), userIn.coords.getLongitudeE6()), userIn.username, "");
context = contextIn;
diff --git a/main/src/cgeo/geocaching/mapsforge/mfOverlay.java b/main/src/cgeo/geocaching/maps/mapsforge/mfOverlay.java
index 69ec499..a2ea3f4 100644
--- a/main/src/cgeo/geocaching/mapsforge/mfOverlay.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/mfOverlay.java
@@ -1,10 +1,10 @@
-package cgeo.geocaching.mapsforge;
+package cgeo.geocaching.maps.mapsforge;
import cgeo.geocaching.cgSettings;
-import cgeo.geocaching.mapcommon.cgMapMyOverlay;
-import cgeo.geocaching.mapcommon.cgOverlayScale;
-import cgeo.geocaching.mapinterfaces.OverlayBase;
-import cgeo.geocaching.mapinterfaces.OverlayImpl;
+import cgeo.geocaching.maps.PositionOverlay;
+import cgeo.geocaching.maps.ScaleOverlay;
+import cgeo.geocaching.maps.interfaces.GeneralOverlay;
+import cgeo.geocaching.maps.interfaces.OverlayImpl;
import org.mapsforge.android.maps.Overlay;
import org.mapsforge.android.maps.Projection;
@@ -18,17 +18,17 @@ import java.util.concurrent.locks.ReentrantLock;
public class mfOverlay extends Overlay implements OverlayImpl {
- private OverlayBase overlayBase = null;
+ private GeneralOverlay overlayBase = null;
private Lock lock = new ReentrantLock();
public mfOverlay(Activity activityIn, cgSettings settingsIn, OverlayImpl.overlayType ovlType) {
switch (ovlType) {
case PositionOverlay:
- overlayBase = new cgMapMyOverlay(settingsIn, activityIn, this);
+ overlayBase = new PositionOverlay(settingsIn, activityIn, this);
break;
case ScaleOverlay:
- overlayBase = new cgOverlayScale(activityIn, settingsIn, this);
+ overlayBase = new ScaleOverlay(activityIn, settingsIn, this);
}
}
@@ -41,7 +41,7 @@ public class mfOverlay extends Overlay implements OverlayImpl {
}
}
- public OverlayBase getBase() {
+ public GeneralOverlay getBase() {
return overlayBase;
}