MapFragmentBase.java
added convince methods UserOverlayBase.java added convince methods UserOverlayMapFragment.java added convince methods SkyHoookUserOverlayMapFragment.java added convince methods
BIN
LocationLib/bin/res/drawable-hdpi/map_action_bar.png
Normal file
|
After Width: | Height: | Size: 898 B |
BIN
LocationLib/bin/res/drawable-hdpi/map_mode_action_bar.png
Normal file
|
After Width: | Height: | Size: 760 B |
|
After Width: | Height: | Size: 751 B |
BIN
LocationLib/bin/res/drawable-hdpi/my_location_action_bar.png
Normal file
|
After Width: | Height: | Size: 466 B |
BIN
LocationLib/bin/res/drawable-hdpi/nav_action_bar.png
Normal file
|
After Width: | Height: | Size: 776 B |
BIN
LocationLib/bin/res/drawable-ldpi/map_action_bar.png
Normal file
|
After Width: | Height: | Size: 527 B |
BIN
LocationLib/bin/res/drawable-ldpi/map_mode_action_bar.png
Normal file
|
After Width: | Height: | Size: 417 B |
|
After Width: | Height: | Size: 473 B |
BIN
LocationLib/bin/res/drawable-ldpi/my_location_action_bar.png
Normal file
|
After Width: | Height: | Size: 276 B |
BIN
LocationLib/bin/res/drawable-ldpi/nav_action_bar.png
Normal file
|
After Width: | Height: | Size: 410 B |
BIN
LocationLib/bin/res/drawable-mdpi/map_action_bar.png
Normal file
|
After Width: | Height: | Size: 664 B |
BIN
LocationLib/bin/res/drawable-mdpi/map_mode_action_bar.png
Normal file
|
After Width: | Height: | Size: 567 B |
|
After Width: | Height: | Size: 608 B |
BIN
LocationLib/bin/res/drawable-mdpi/my_location_action_bar.png
Normal file
|
After Width: | Height: | Size: 359 B |
BIN
LocationLib/bin/res/drawable-mdpi/nav_action_bar.png
Normal file
|
After Width: | Height: | Size: 523 B |
BIN
LocationLib/bin/res/drawable-xhdpi/map_action_bar.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
LocationLib/bin/res/drawable-xhdpi/map_mode_action_bar.png
Normal file
|
After Width: | Height: | Size: 949 B |
|
After Width: | Height: | Size: 943 B |
BIN
LocationLib/bin/res/drawable-xhdpi/my_location_action_bar.png
Normal file
|
After Width: | Height: | Size: 579 B |
BIN
LocationLib/bin/res/drawable-xhdpi/nav_action_bar.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
LocationLib/bin/res/drawable/compass.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
LocationLib/bin/res/drawable/compass_lrg.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
LocationLib/bin/res/drawable/compass_med.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
LocationLib/bin/res/drawable/compass_sm.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
LocationLib/bin/res/drawable/logoidea3.png
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
LocationLib/bin/res/drawable/needle.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
LocationLib/bin/res/drawable/needle_lrg.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
LocationLib/bin/res/drawable/needle_med.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
LocationLib/bin/res/drawable/needle_sm.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
LocationLib/bin/res/drawable/skyhook_logo_alpha.png
Normal file
|
After Width: | Height: | Size: 50 KiB |
BIN
LocationLib/bin/res/drawable/skyhook_logo_alpha_small.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
LocationLib/bin/res/drawable/tc_logo_complete.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
LocationLib/bin/res/drawable/user.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
LocationLib/bin/res/drawable/user_arrow_animation_1.png
Normal file
|
After Width: | Height: | Size: 825 B |
BIN
LocationLib/bin/res/drawable/user_arrow_animation_2.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
LocationLib/bin/res/drawable/user_arrow_animation_3.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
@@ -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
|
||||
@@ -83,9 +108,9 @@ public class SkyHoookUserOverlayMapFragment extends MapFragmentBase implements G
|
||||
*/
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
mUserOverlay.disableMyLocation();
|
||||
removeOverlay(mUserOverlay);
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,9 +119,29 @@ public class SkyHoookUserOverlayMapFragment extends MapFragmentBase implements G
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
@@ -31,6 +32,26 @@ public abstract class MapFragmentBase extends Fragment {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -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(){
|
||||
|
||||
@@ -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
|
||||
@@ -79,9 +104,9 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL
|
||||
*/
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
mUserOverlay.disableMyLocation();
|
||||
removeOverlay(mUserOverlay);
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -90,9 +115,29 @@ 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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,5 +164,4 @@ public class UserOverlayMapFragment extends MapFragmentBase implements GeoPointL
|
||||
public void setGeoPointLocationListener(GeoPointLocationListener listener){
|
||||
mGeoPointLocationListener = listener;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||