diff --git a/LocationLib/bin/locationlib.jar b/LocationLib/bin/locationlib.jar index 4eee18f..bf7428b 100644 Binary files a/LocationLib/bin/locationlib.jar and b/LocationLib/bin/locationlib.jar differ diff --git a/LocationLib/bin/res/drawable-hdpi/map_action_bar.png b/LocationLib/bin/res/drawable-hdpi/map_action_bar.png new file mode 100644 index 0000000..a2917c3 Binary files /dev/null and b/LocationLib/bin/res/drawable-hdpi/map_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-hdpi/map_mode_action_bar.png b/LocationLib/bin/res/drawable-hdpi/map_mode_action_bar.png new file mode 100644 index 0000000..d89852e Binary files /dev/null and b/LocationLib/bin/res/drawable-hdpi/map_mode_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-hdpi/mark_my_location_action_bar.png b/LocationLib/bin/res/drawable-hdpi/mark_my_location_action_bar.png new file mode 100644 index 0000000..df09838 Binary files /dev/null and b/LocationLib/bin/res/drawable-hdpi/mark_my_location_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-hdpi/my_location_action_bar.png b/LocationLib/bin/res/drawable-hdpi/my_location_action_bar.png new file mode 100644 index 0000000..cb44adf Binary files /dev/null and b/LocationLib/bin/res/drawable-hdpi/my_location_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-hdpi/nav_action_bar.png b/LocationLib/bin/res/drawable-hdpi/nav_action_bar.png new file mode 100644 index 0000000..b8213ec Binary files /dev/null and b/LocationLib/bin/res/drawable-hdpi/nav_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-ldpi/map_action_bar.png b/LocationLib/bin/res/drawable-ldpi/map_action_bar.png new file mode 100644 index 0000000..a50e0e1 Binary files /dev/null and b/LocationLib/bin/res/drawable-ldpi/map_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-ldpi/map_mode_action_bar.png b/LocationLib/bin/res/drawable-ldpi/map_mode_action_bar.png new file mode 100644 index 0000000..faca1db Binary files /dev/null and b/LocationLib/bin/res/drawable-ldpi/map_mode_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-ldpi/mark_my_location_action_bar.png b/LocationLib/bin/res/drawable-ldpi/mark_my_location_action_bar.png new file mode 100644 index 0000000..a4a6019 Binary files /dev/null and b/LocationLib/bin/res/drawable-ldpi/mark_my_location_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-ldpi/my_location_action_bar.png b/LocationLib/bin/res/drawable-ldpi/my_location_action_bar.png new file mode 100644 index 0000000..9089f81 Binary files /dev/null and b/LocationLib/bin/res/drawable-ldpi/my_location_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-ldpi/nav_action_bar.png b/LocationLib/bin/res/drawable-ldpi/nav_action_bar.png new file mode 100644 index 0000000..5830dc9 Binary files /dev/null and b/LocationLib/bin/res/drawable-ldpi/nav_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-mdpi/map_action_bar.png b/LocationLib/bin/res/drawable-mdpi/map_action_bar.png new file mode 100644 index 0000000..cbfb81f Binary files /dev/null and b/LocationLib/bin/res/drawable-mdpi/map_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-mdpi/map_mode_action_bar.png b/LocationLib/bin/res/drawable-mdpi/map_mode_action_bar.png new file mode 100644 index 0000000..599ca23 Binary files /dev/null and b/LocationLib/bin/res/drawable-mdpi/map_mode_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-mdpi/mark_my_location_action_bar.png b/LocationLib/bin/res/drawable-mdpi/mark_my_location_action_bar.png new file mode 100644 index 0000000..eb0a11a Binary files /dev/null and b/LocationLib/bin/res/drawable-mdpi/mark_my_location_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-mdpi/my_location_action_bar.png b/LocationLib/bin/res/drawable-mdpi/my_location_action_bar.png new file mode 100644 index 0000000..6968159 Binary files /dev/null and b/LocationLib/bin/res/drawable-mdpi/my_location_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-mdpi/nav_action_bar.png b/LocationLib/bin/res/drawable-mdpi/nav_action_bar.png new file mode 100644 index 0000000..5dadd62 Binary files /dev/null and b/LocationLib/bin/res/drawable-mdpi/nav_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-xhdpi/map_action_bar.png b/LocationLib/bin/res/drawable-xhdpi/map_action_bar.png new file mode 100644 index 0000000..75f314a Binary files /dev/null and b/LocationLib/bin/res/drawable-xhdpi/map_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-xhdpi/map_mode_action_bar.png b/LocationLib/bin/res/drawable-xhdpi/map_mode_action_bar.png new file mode 100644 index 0000000..167a0f0 Binary files /dev/null and b/LocationLib/bin/res/drawable-xhdpi/map_mode_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-xhdpi/mark_my_location_action_bar.png b/LocationLib/bin/res/drawable-xhdpi/mark_my_location_action_bar.png new file mode 100644 index 0000000..de75080 Binary files /dev/null and b/LocationLib/bin/res/drawable-xhdpi/mark_my_location_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-xhdpi/my_location_action_bar.png b/LocationLib/bin/res/drawable-xhdpi/my_location_action_bar.png new file mode 100644 index 0000000..745e7f8 Binary files /dev/null and b/LocationLib/bin/res/drawable-xhdpi/my_location_action_bar.png differ diff --git a/LocationLib/bin/res/drawable-xhdpi/nav_action_bar.png b/LocationLib/bin/res/drawable-xhdpi/nav_action_bar.png new file mode 100644 index 0000000..4f89c1d Binary files /dev/null and b/LocationLib/bin/res/drawable-xhdpi/nav_action_bar.png differ diff --git a/LocationLib/bin/res/drawable/compass.png b/LocationLib/bin/res/drawable/compass.png new file mode 100644 index 0000000..87848e5 Binary files /dev/null and b/LocationLib/bin/res/drawable/compass.png differ diff --git a/LocationLib/bin/res/drawable/compass_lrg.png b/LocationLib/bin/res/drawable/compass_lrg.png new file mode 100644 index 0000000..7fce2d5 Binary files /dev/null and b/LocationLib/bin/res/drawable/compass_lrg.png differ diff --git a/LocationLib/bin/res/drawable/compass_med.png b/LocationLib/bin/res/drawable/compass_med.png new file mode 100644 index 0000000..d847df4 Binary files /dev/null and b/LocationLib/bin/res/drawable/compass_med.png differ diff --git a/LocationLib/bin/res/drawable/compass_sm.png b/LocationLib/bin/res/drawable/compass_sm.png new file mode 100644 index 0000000..54ce936 Binary files /dev/null and b/LocationLib/bin/res/drawable/compass_sm.png differ diff --git a/LocationLib/bin/res/drawable/logoidea3.png b/LocationLib/bin/res/drawable/logoidea3.png new file mode 100644 index 0000000..fdc73c3 Binary files /dev/null and b/LocationLib/bin/res/drawable/logoidea3.png differ diff --git a/LocationLib/bin/res/drawable/needle.png b/LocationLib/bin/res/drawable/needle.png new file mode 100644 index 0000000..93fad78 Binary files /dev/null and b/LocationLib/bin/res/drawable/needle.png differ diff --git a/LocationLib/bin/res/drawable/needle_lrg.png b/LocationLib/bin/res/drawable/needle_lrg.png new file mode 100644 index 0000000..ba5f535 Binary files /dev/null and b/LocationLib/bin/res/drawable/needle_lrg.png differ diff --git a/LocationLib/bin/res/drawable/needle_med.png b/LocationLib/bin/res/drawable/needle_med.png new file mode 100644 index 0000000..bcd8a6d Binary files /dev/null and b/LocationLib/bin/res/drawable/needle_med.png differ diff --git a/LocationLib/bin/res/drawable/needle_sm.png b/LocationLib/bin/res/drawable/needle_sm.png new file mode 100644 index 0000000..258bc24 Binary files /dev/null and b/LocationLib/bin/res/drawable/needle_sm.png differ diff --git a/LocationLib/bin/res/drawable/skyhook_logo_alpha.png b/LocationLib/bin/res/drawable/skyhook_logo_alpha.png new file mode 100644 index 0000000..d5ce291 Binary files /dev/null and b/LocationLib/bin/res/drawable/skyhook_logo_alpha.png differ diff --git a/LocationLib/bin/res/drawable/skyhook_logo_alpha_small.png b/LocationLib/bin/res/drawable/skyhook_logo_alpha_small.png new file mode 100644 index 0000000..8058c19 Binary files /dev/null and b/LocationLib/bin/res/drawable/skyhook_logo_alpha_small.png differ diff --git a/LocationLib/bin/res/drawable/tc_logo_complete.png b/LocationLib/bin/res/drawable/tc_logo_complete.png new file mode 100644 index 0000000..073970c Binary files /dev/null and b/LocationLib/bin/res/drawable/tc_logo_complete.png differ diff --git a/LocationLib/bin/res/drawable/user.png b/LocationLib/bin/res/drawable/user.png new file mode 100644 index 0000000..579f876 Binary files /dev/null and b/LocationLib/bin/res/drawable/user.png differ diff --git a/LocationLib/bin/res/drawable/user_arrow_animation_1.png b/LocationLib/bin/res/drawable/user_arrow_animation_1.png new file mode 100644 index 0000000..9c6778e Binary files /dev/null and b/LocationLib/bin/res/drawable/user_arrow_animation_1.png differ diff --git a/LocationLib/bin/res/drawable/user_arrow_animation_2.png b/LocationLib/bin/res/drawable/user_arrow_animation_2.png new file mode 100644 index 0000000..630fd72 Binary files /dev/null and b/LocationLib/bin/res/drawable/user_arrow_animation_2.png differ diff --git a/LocationLib/bin/res/drawable/user_arrow_animation_3.png b/LocationLib/bin/res/drawable/user_arrow_animation_3.png new file mode 100644 index 0000000..c1448f7 Binary files /dev/null and b/LocationLib/bin/res/drawable/user_arrow_animation_3.png differ diff --git a/LocationLib/src/com/TwentyCodes/android/SkyHook/SkyHoookUserOverlayMapFragment.java b/LocationLib/src/com/TwentyCodes/android/SkyHook/SkyHoookUserOverlayMapFragment.java index 637009f..f72d6f8 100644 --- a/LocationLib/src/com/TwentyCodes/android/SkyHook/SkyHoookUserOverlayMapFragment.java +++ b/LocationLib/src/com/TwentyCodes/android/SkyHook/SkyHoookUserOverlayMapFragment.java @@ -32,6 +32,31 @@ public class SkyHoookUserOverlayMapFragment extends MapFragmentBase implements G super(); } + /** + * disables the GPS dialog + * @author ricky barrette + */ + public void disableGPSDialog(){ + mUserOverlay.disableGPSDialog(); + } + + /** + * enables the GPS dialog + * @author ricky barrette + */ + public void enableGPSDialog(){ + mUserOverlay.enableGPSDialog(); + } + + /** + * Tells the useroverlay to pan the map to follow the user + * @param followUser + * @author ricky barrette + */ + public void followUser(boolean followUser){ + mUserOverlay.followUser(followUser); + } + /** * @return the users current location * @author ricky barrette @@ -39,7 +64,7 @@ public class SkyHoookUserOverlayMapFragment extends MapFragmentBase implements G public GeoPoint getUserLocation() { return mUserOverlay.getUserLocation(); } - + /** * Called when the compass is updated * (non-Javadoc) @@ -60,7 +85,7 @@ public class SkyHoookUserOverlayMapFragment extends MapFragmentBase implements G if(mGeoPointLocationListener != null) mGeoPointLocationListener.onLocationChanged(point, accuracy); } - + /** * (non-Javadoc) * @see com.TwentyCodes.android.location.MapFragmentBase#onMapViewCreate(com.TwentyCodes.android.location.MapView) @@ -83,22 +108,42 @@ public class SkyHoookUserOverlayMapFragment extends MapFragmentBase implements G */ @Override public void onPause() { + super.onPause(); mUserOverlay.disableMyLocation(); removeOverlay(mUserOverlay); - super.onPause(); } - + /** * (non-Javadoc) * @see com.TwentyCodes.android.location.MapFragmentBase#onResume() */ @Override public void onResume() { + super.onResume(); if(mUserOverlay != null) mUserOverlay.enableMyLocation(); - super.onResume(); } - + + /** + * reorders the overlays to the UserOverlay always on top + * @author ricky barrette + */ + public void reorderOverlays() { + getMap().getOverlays().remove(mUserOverlay); + getMap().getOverlays().add(mUserOverlay); + } + + /** + * @param needleResId + * @param backgroundResId + * @param x + * @param y + * @author ricky barrette + */ + public void setCompassDrawables(int needleResId, int backgroundResId, int x, int y){ + mUserOverlay.setCompassDrawables(needleResId, backgroundResId, x, y); + } + /** * @param listener * @author ricky barrette @@ -115,7 +160,7 @@ public class SkyHoookUserOverlayMapFragment extends MapFragmentBase implements G public void setDestination(GeoPoint destination){ mUserOverlay.setDestination(destination); } - + /** * @param listener * @author ricky barrette diff --git a/LocationLib/src/com/TwentyCodes/android/location/MapFragmentBase.java b/LocationLib/src/com/TwentyCodes/android/location/MapFragmentBase.java index 83a1770..7466da7 100644 --- a/LocationLib/src/com/TwentyCodes/android/location/MapFragmentBase.java +++ b/LocationLib/src/com/TwentyCodes/android/location/MapFragmentBase.java @@ -13,6 +13,7 @@ import android.view.View; import android.view.ViewGroup; import com.google.android.maps.GeoPoint; +import com.google.android.maps.Overlay; /** * This map fragment will maintain a map view and all its functions @@ -30,7 +31,27 @@ public abstract class MapFragmentBase extends Fragment { public MapFragmentBase() { super(); } + + public void addOverlay(Overlay overlay){ + mMapView.getOverlays().add(overlay); + } + + /** + * changes the map mode + * @author ricky barrette + */ + public void changeMapMode() { + mMapView.setSatellite(!mMapView.isSatellite()); + } + /** + * @return mapview + * @author ricky barrette + */ + public MapView getMap(){ + return mMapView; + } + /** * Called when the fragment view is first created * (non-Javadoc) @@ -60,7 +81,7 @@ public abstract class MapFragmentBase extends Fragment { * @param overlay * @author ricky barrette */ - protected void removeOverlay(Object overlay){ + public void removeOverlay(Object overlay){ mMapView.getOverlays().remove(overlay); } @@ -69,7 +90,10 @@ public abstract class MapFragmentBase extends Fragment { * @param point * @author ricky barrette */ - public void setMapCenter(GeoPoint point){ + public boolean setMapCenter(GeoPoint point){ + if(point == null) + return false; mMapView.getController().setCenter(point); + return true; } } \ No newline at end of file diff --git a/LocationLib/src/com/TwentyCodes/android/location/UserOverlayBase.java b/LocationLib/src/com/TwentyCodes/android/location/UserOverlayBase.java index 454b554..c48a34c 100644 --- a/LocationLib/src/com/TwentyCodes/android/location/UserOverlayBase.java +++ b/LocationLib/src/com/TwentyCodes/android/location/UserOverlayBase.java @@ -300,6 +300,8 @@ public abstract class UserOverlayBase extends Overlay implements GeoPointLocatio /** * Enables the Acquiring GPS dialog if the location has not been acquired + * + * TODO fix funtion * @author ricky barrette */ public void enableGPSDialog(){ diff --git a/LocationLib/src/com/TwentyCodes/android/location/UserOverlayMapFragment.java b/LocationLib/src/com/TwentyCodes/android/location/UserOverlayMapFragment.java index 2e30129..bc91270 100644 --- a/LocationLib/src/com/TwentyCodes/android/location/UserOverlayMapFragment.java +++ b/LocationLib/src/com/TwentyCodes/android/location/UserOverlayMapFragment.java @@ -28,6 +28,31 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL super(); } + /** + * disables the GPS dialog + * @author ricky barrette + */ + public void disableGPSDialog(){ + mUserOverlay.disableGPSDialog(); + } + + /** + * enables the GPS dialog + * @author ricky barrette + */ + public void enableGPSDialog(){ + mUserOverlay.enableGPSDialog(); + } + + /** + * Tells the useroverlay to pan the map to follow the user + * @param followUser + * @author ricky barrette + */ + public void followUser(boolean followUser){ + mUserOverlay.followUser(followUser); + } + /** * @return the users current location * @author ricky barrette @@ -35,7 +60,7 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL public GeoPoint getUserLocation() { return mUserOverlay.getUserLocation(); } - + /** * Called when the compass is updated * (non-Javadoc) @@ -56,7 +81,7 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL if(mGeoPointLocationListener != null) mGeoPointLocationListener.onLocationChanged(point, accuracy); } - + /** * (non-Javadoc) * @see com.TwentyCodes.android.location.MapFragmentBase#onMapViewCreate(com.TwentyCodes.android.location.MapView) @@ -72,16 +97,16 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL map.getOverlays().add(mUserOverlay); } - + /** * (non-Javadoc) * @see com.TwentyCodes.android.location.MapFragmentBase#onPause() */ @Override public void onPause() { + super.onPause(); mUserOverlay.disableMyLocation(); removeOverlay(mUserOverlay); - super.onPause(); } /** @@ -90,11 +115,31 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL */ @Override public void onResume() { + super.onResume(); if(mUserOverlay != null) mUserOverlay.enableMyLocation(); - super.onResume(); } - + + /** + * reorders the overlays to the UserOverlay always on top + * @author ricky barrette + */ + public void reorderOverlays() { + getMap().getOverlays().remove(mUserOverlay); + getMap().getOverlays().add(mUserOverlay); + } + + /** + * @param needleResId + * @param backgroundResId + * @param x + * @param y + * @author ricky barrette + */ + public void setCompassDrawables(int needleResId, int backgroundResId, int x, int y){ + mUserOverlay.setCompassDrawables(needleResId, backgroundResId, x, y); + } + /** * @param listener * @author ricky barrette @@ -102,7 +147,7 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL public void setCompassListener(CompassListener listener){ mCompassListener = listener; } - + /** * Sets the destination for the compass to point to * @param destination @@ -111,7 +156,7 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL public void setDestination(GeoPoint destination){ mUserOverlay.setDestination(destination); } - + /** * @param listener * @author ricky barrette @@ -119,5 +164,4 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL public void setGeoPointLocationListener(GeoPointLocationListener listener){ mGeoPointLocationListener = listener; } - }