diff --git a/LocationLib/bin/locationlib.jar b/LocationLib/bin/locationlib.jar index 934e6c0..434d0eb 100644 Binary files a/LocationLib/bin/locationlib.jar and b/LocationLib/bin/locationlib.jar differ diff --git a/LocationLib/src/com/TwentyCodes/android/fragments/SkyHoookUserOverlayMapFragment.java b/LocationLib/src/com/TwentyCodes/android/fragments/SkyHoookUserOverlayMapFragment.java index ec9b5a7..7745960 100644 --- a/LocationLib/src/com/TwentyCodes/android/fragments/SkyHoookUserOverlayMapFragment.java +++ b/LocationLib/src/com/TwentyCodes/android/fragments/SkyHoookUserOverlayMapFragment.java @@ -40,6 +40,14 @@ public class SkyHoookUserOverlayMapFragment extends MapFragmentBase implements G public void followUser(boolean followUser){ mUserOverlay.followUser(followUser); } + + /** + * @return return the current destination + * @author ricky barrette + */ + public GeoPoint getDestination(){ + return mUserOverlay.getDestination(); + } /** * @return the users current location @@ -60,6 +68,12 @@ public class SkyHoookUserOverlayMapFragment extends MapFragmentBase implements G mCompassListener.onCompassUpdate(bearing); } + @Override + public void onFirstFix(boolean isFistFix) { + if(mGeoPointLocationListener != null) + mGeoPointLocationListener.onFirstFix(isFistFix); + } + /** * Called when has a location to report * @author ricky barrette @@ -84,7 +98,7 @@ public class SkyHoookUserOverlayMapFragment extends MapFragmentBase implements G map.getOverlays().add(mUserOverlay); } - + /** * (non-Javadoc) * @see com.TwentyCodes.android.fragments.MapFragmentBase#onPause() @@ -136,7 +150,7 @@ public class SkyHoookUserOverlayMapFragment extends MapFragmentBase implements G public void setCompassListener(CompassListener listener){ mCompassListener = listener; } - + /** * Sets the destination for the compass to point to * @param destination @@ -153,10 +167,4 @@ public class SkyHoookUserOverlayMapFragment extends MapFragmentBase implements G public void setGeoPointLocationListener(GeoPointLocationListener listener){ mGeoPointLocationListener = listener; } - - @Override - public void onFirstFix(boolean isFistFix) { - if(mGeoPointLocationListener != null) - mGeoPointLocationListener.onFirstFix(isFistFix); - } } \ No newline at end of file diff --git a/LocationLib/src/com/TwentyCodes/android/fragments/UserOverlayMapFragment.java b/LocationLib/src/com/TwentyCodes/android/fragments/UserOverlayMapFragment.java index 04d464a..850043d 100644 --- a/LocationLib/src/com/TwentyCodes/android/fragments/UserOverlayMapFragment.java +++ b/LocationLib/src/com/TwentyCodes/android/fragments/UserOverlayMapFragment.java @@ -40,6 +40,14 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL public void followUser(boolean followUser){ mUserOverlay.followUser(followUser); } + + /** + * @return return the current destination + * @author ricky barrette + */ + public GeoPoint getDestination(){ + return mUserOverlay.getDestination(); + } /** * @return the users current location @@ -60,6 +68,12 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL mCompassListener.onCompassUpdate(bearing); } + @Override + public void onFirstFix(boolean isFistFix) { + if(mGeoPointLocationListener != null) + mGeoPointLocationListener.onFirstFix(isFistFix); + } + /** * Called when skyhook has a location to report * @author ricky barrette @@ -69,7 +83,7 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL if(mGeoPointLocationListener != null) mGeoPointLocationListener.onLocationChanged(point, accuracy); } - + /** * (non-Javadoc) * @see com.TwentyCodes.android.fragments.MapFragmentBase#onMapViewCreate(com.TwentyCodes.android.location.MapView) @@ -84,7 +98,7 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL map.getOverlays().add(mUserOverlay); } - + /** * (non-Javadoc) * @see com.TwentyCodes.android.fragments.MapFragmentBase#onPause() @@ -95,7 +109,7 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL mUserOverlay.disableMyLocation(); removeOverlay(mUserOverlay); } - + /** * (non-Javadoc) * @see com.TwentyCodes.android.fragments.MapFragmentBase#onResume() @@ -128,7 +142,7 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL public void setCompassDrawables(int needleResId, int backgroundResId, int x, int y){ mUserOverlay.setCompassDrawables(needleResId, backgroundResId, x, y); } - + /** * @param listener * @author ricky barrette @@ -153,10 +167,4 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL public void setGeoPointLocationListener(GeoPointLocationListener listener){ mGeoPointLocationListener = listener; } - - @Override - public void onFirstFix(boolean isFistFix) { - if(mGeoPointLocationListener != null) - mGeoPointLocationListener.onFirstFix(isFistFix); - } } \ No newline at end of file diff --git a/LocationLib/src/com/TwentyCodes/android/overlays/CompasOverlay.java b/LocationLib/src/com/TwentyCodes/android/overlays/CompasOverlay.java index 2537ddd..81f1dfe 100644 --- a/LocationLib/src/com/TwentyCodes/android/overlays/CompasOverlay.java +++ b/LocationLib/src/com/TwentyCodes/android/overlays/CompasOverlay.java @@ -187,6 +187,14 @@ public class CompasOverlay extends Overlay implements CompassListener { public float getBearing(){ return mBearing; } + + /** + * @return return the current destination + * @author ricky barrette + */ + public GeoPoint getDestination(){ + return mDestination; + } /** * Called from the compass Sensor to update the current bearing diff --git a/LocationLib/src/com/TwentyCodes/android/overlays/UserOverlayBase.java b/LocationLib/src/com/TwentyCodes/android/overlays/UserOverlayBase.java index eb51b92..e97f91f 100644 --- a/LocationLib/src/com/TwentyCodes/android/overlays/UserOverlayBase.java +++ b/LocationLib/src/com/TwentyCodes/android/overlays/UserOverlayBase.java @@ -311,6 +311,14 @@ public abstract class UserOverlayBase extends Overlay implements GeoPointLocatio isFollowingUser = followUser; } + /** + * @return return the current destination + * @author ricky barrette + */ + public GeoPoint getDestination(){ + return mCompass.getDestination(); + } + /** * returns the users current bearing * @return