public class FreeLookMapComponent extends AbstractMapComponent implements MapMenuEventListener, PointMapItem.OnPointChangedListener, MapItem.OnGroupChangedListener, android.content.SharedPreferences.OnSharedPreferenceChangeListener
MapTouchController
AbstractMapComponent.OnAllComponentsCreatedCallback
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FREE_LOOK |
TAG
Constructor and Description |
---|
FreeLookMapComponent() |
Modifier and Type | Method and Description |
---|---|
static FreeLookMapComponent |
getInstance() |
PointMapItem |
getItem()
Get the current focused free look item
|
GeoPoint |
getPoint()
Get the current focus point for free look
|
boolean |
isEnabled()
Check if free look is currently enabled
|
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 |
onItemAdded(MapItem item,
MapGroup group) |
void |
onItemRemoved(MapItem item,
MapGroup group) |
void |
onPointChanged(PointMapItem item) |
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 |
setEnabled(boolean enabled)
Set whether 3D free look is enabled
|
void |
setItem(MapItem item)
Set the focused map item in free form 3D mode
|
void |
setPoint(GeoPoint point)
Set the current focus point for free look
|
addOverlay, onConfigurationChanged, onCreateOptionsMenu, onDestroy, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onResume, onStart, onStop, registerReceiver, removeOverlay, setOnAllComponentsCreatedCallback, unregisterReceiver
public static final java.lang.String FREE_LOOK
public static FreeLookMapComponent 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 setEnabled(boolean enabled)
enabled
- True if enabledpublic boolean isEnabled()
public void setItem(MapItem item)
item
- Map itempublic PointMapItem getItem()
public void setPoint(GeoPoint point)
point
- Focus pointpublic GeoPoint getPoint()
public boolean onShowMenu(MapItem item)
MapMenuEventListener
onShowMenu
in interface MapMenuEventListener
item
- Map itempublic void onHideMenu(MapItem item)
MapMenuEventListener
onHideMenu
in interface MapMenuEventListener
public void onPointChanged(PointMapItem item)
onPointChanged
in interface PointMapItem.OnPointChangedListener
public void onItemAdded(MapItem item, MapGroup group)
onItemAdded
in interface MapItem.OnGroupChangedListener
public void onItemRemoved(MapItem item, MapGroup group)
onItemRemoved
in interface MapItem.OnGroupChangedListener
public void onSharedPreferenceChanged(android.content.SharedPreferences prefs, java.lang.String key)
onSharedPreferenceChanged
in interface android.content.SharedPreferences.OnSharedPreferenceChangeListener