Files
location_library/LocationLib/src/com/TwentyCodes/android/overlays/SkyHookUserOverlay.java
Ricky Barrette e1e1bea1ef Refactored the entire library
I also moved the directions listfragment, overlay, and other required
classes from FMC into the library

Change-Id: Iba27e29d89e864dbeca3a2670aed552a8be4f2b8
Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
2012-03-05 08:28:47 -05:00

59 lines
1.5 KiB
Java

/**
* @author Twenty Codes, LLC
* @author ricky barrette
* @date Oct 2, 2010
*/
package com.TwentyCodes.android.overlays;
import android.content.Context;
import com.TwentyCodes.android.SkyHook.SkyHook;
import com.google.android.maps.MapView;
/**
* this class will be used to display the users location on the map using skyhook's call back methods
* @author ricky barrette
*/
public class SkyHookUserOverlay extends UserOverlayBase{
private SkyHook mSkyHook;
public SkyHookUserOverlay(MapView mapView, Context context) {
super(mapView, context);
mSkyHook = new SkyHook(context);
}
/**
* Construct a new SkyHookUserOverlay
* @param mapView
* @param context
* @param followUser
* @author ricky barrette
*/
public SkyHookUserOverlay(MapView mapView, Context context, boolean followUser) {
super(mapView, context, followUser);
mSkyHook = new SkyHook(context);
}
/**
* Called when the location provider needs to be disabled
* (non-Javadoc)
* @see com.TwentyCodes.android.overlays.UserOverlayBase#onMyLocationDisabled()
*/
@Override
public void onMyLocationDisabled() {
mSkyHook.removeUpdates();
}
/**
* Called when the location provider needs to be enabled
* (non-Javadoc)
* @see com.TwentyCodes.android.overlays.UserOverlayBase#onMyLocationEnabled()
*/
@Override
public void onMyLocationEnabled() {
mSkyHook.setLocationListener(this);
mSkyHook.getUpdates();
}
}