public class CompassArrowMapComponent extends AbstractMapComponent implements Marker.OnTrackChangedListener, MapWidget.OnClickListener, android.content.SharedPreferences.OnSharedPreferenceChangeListener, MapWidget.OnLongPressListener, MapWidget.OnWidgetPointChangedListener, AbstractParentWidget.OnWidgetListChangedListener, MapMenuEventListener
NavView
AbstractMapComponent.OnAllComponentsCreatedCallback
Modifier and Type | Field and Description |
---|---|
protected android.content.SharedPreferences |
_prefs |
protected com.atakmap.android.mapcompass.CompassArrowWidget |
compass |
protected LinearLayoutWidget |
compassLayout |
protected TextWidget |
compassText |
protected android.content.Context |
context |
static java.lang.String |
FREE_LOOK |
protected LinearLayoutWidget |
freeLookWidget |
static java.lang.String |
HIDE_ACTION |
static java.lang.String |
LOCK_TILT |
protected boolean |
lockedHeading |
protected double |
lockedHeadingValue |
protected MapMode |
mapMode |
protected MapTouchController |
mapTouch |
protected MapView |
mapView |
protected android.content.BroadcastReceiver |
orientationReceiver |
protected Marker |
radialFocus |
protected Marker |
selfItem |
static java.lang.String |
SHOW_ACTION |
static java.lang.String |
TAG |
protected com.atakmap.android.mapcompass.TiltLockWidgetController |
tlwc |
static java.lang.String |
TOGGLE_3D |
Constructor and Description |
---|
CompassArrowMapComponent() |
Modifier and Type | Method and Description |
---|---|
void |
enable3DControls(boolean enable)
Enable Experimental 3-D controls for ATAK
|
void |
enableSlider(boolean enable)
Toggle the rotate/tilt slider widget
This will only work if the matching preference is true
|
static CompassArrowMapComponent |
getInstance()
Obtain the current instance of the CompassArrowMapComponent.
|
MapMode |
getMapMode()
Get the current map mode.
|
void |
onCreate(android.content.Context context,
android.content.Intent intent,
MapView view)
Called when the component is first created
|
protected void |
onDestroyImpl(android.content.Context context,
MapView view)
This method is invoked as a subset of the onDestroy call as part of the
MapComponent lifecycle.
|
void |
onHideMenu(MapItem item)
The radial menu is about to be closed
|
void |
onMapMoved(AtakMapView view,
boolean animate) |
void |
onMapProjectionChanged(AtakMapView view) |
void |
onMapWidgetClick(MapWidget widget,
android.view.MotionEvent event) |
void |
onMapWidgetLongPress(MapWidget widget) |
void |
onSharedPreferenceChanged(android.content.SharedPreferences prefs,
java.lang.String key) |
boolean |
onShowMenu(MapItem item)
The radial menu is about to be shown for an item
|
void |
onTrackChanged(Marker marker) |
void |
onWidgetAdded(AbstractParentWidget parent,
int index,
MapWidget child) |
void |
onWidgetPointChanged(MapWidget widget) |
void |
onWidgetRemoved(AbstractParentWidget parent,
int index,
MapWidget child) |
void |
setGPSLockAction(java.lang.Runnable r)
Set the gps lock symbol if the callback r is not null.
|
void |
setMapMode(MapMode action) |
protected void |
showCompassText(boolean show) |
protected void |
toggleMapMode() |
protected void |
toggleWidget(boolean show) |
protected void |
updateDegDisplay(double deg) |
addOverlay, onConfigurationChanged, onCreateOptionsMenu, onDestroy, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onResume, onStart, onStop, registerReceiver, removeOverlay, setOnAllComponentsCreatedCallback, unregisterReceiver
public static final java.lang.String TAG
public static final java.lang.String HIDE_ACTION
public static final java.lang.String SHOW_ACTION
public static final java.lang.String TOGGLE_3D
public static final java.lang.String LOCK_TILT
public static final java.lang.String FREE_LOOK
protected MapView mapView
protected MapTouchController mapTouch
protected android.content.Context context
protected MapMode mapMode
protected LinearLayoutWidget compassLayout
protected com.atakmap.android.mapcompass.CompassArrowWidget compass
protected TextWidget compassText
protected LinearLayoutWidget freeLookWidget
protected double lockedHeadingValue
protected boolean lockedHeading
protected Marker selfItem
protected Marker radialFocus
protected android.content.SharedPreferences _prefs
protected com.atakmap.android.mapcompass.TiltLockWidgetController tlwc
protected final android.content.BroadcastReceiver orientationReceiver
public static CompassArrowMapComponent getInstance()
public void onCreate(android.content.Context context, android.content.Intent intent, MapView view)
MapComponent
onCreate
in interface MapComponent
context
- the context of the component (the MapActivity instance)intent
- the intent of the MapActivityview
- the main MapViewprotected void onDestroyImpl(android.content.Context context, MapView view)
AbstractMapComponent
onDestroyImpl
in class AbstractMapComponent
public void setGPSLockAction(java.lang.Runnable r)
r
- The behavior to invoke when the GPS lock is dimissed.public MapMode getMapMode()
public void setMapMode(MapMode action)
public void onMapProjectionChanged(AtakMapView view)
public void onMapMoved(AtakMapView view, boolean animate)
protected void updateDegDisplay(double deg)
public void onTrackChanged(Marker marker)
onTrackChanged
in interface Marker.OnTrackChangedListener
public void onMapWidgetClick(MapWidget widget, android.view.MotionEvent event)
onMapWidgetClick
in interface MapWidget.OnClickListener
public void onMapWidgetLongPress(MapWidget widget)
onMapWidgetLongPress
in interface MapWidget.OnLongPressListener
public void onWidgetAdded(AbstractParentWidget parent, int index, MapWidget child)
onWidgetAdded
in interface AbstractParentWidget.OnWidgetListChangedListener
public void onWidgetRemoved(AbstractParentWidget parent, int index, MapWidget child)
onWidgetRemoved
in interface AbstractParentWidget.OnWidgetListChangedListener
public void onSharedPreferenceChanged(android.content.SharedPreferences prefs, java.lang.String key)
onSharedPreferenceChanged
in interface android.content.SharedPreferences.OnSharedPreferenceChangeListener
public void onWidgetPointChanged(MapWidget widget)
onWidgetPointChanged
in interface MapWidget.OnWidgetPointChangedListener
public void enable3DControls(boolean enable)
public void enableSlider(boolean enable)
enable
- True to enableprotected void toggleWidget(boolean show)
protected void toggleMapMode()
protected void showCompassText(boolean show)
public boolean onShowMenu(MapItem item)
MapMenuEventListener
onShowMenu
in interface MapMenuEventListener
item
- Map itempublic void onHideMenu(MapItem item)
MapMenuEventListener
onHideMenu
in interface MapMenuEventListener