public class ItemizedIconOverlay<Item extends OverlayItem> extends ItemizedOverlay<Item>
Modifier and Type | Class and Description |
---|---|
static interface |
ItemizedIconOverlay.ActiveItem |
static interface |
ItemizedIconOverlay.OnItemGestureListener<T>
When the item is touched one of these methods may be invoked depending on the type of touch.
|
ItemizedOverlay.OnFocusChangeListener
Overlay.Snappable
Modifier and Type | Field and Description |
---|---|
protected List<Item> |
mItemList |
protected ItemizedIconOverlay.OnItemGestureListener<Item> |
mOnItemGestureListener |
mDefaultMarker, mDrawFocusedItem, mDrawnItemsLimit
mBounds, SHADOW_X_SKEW, SHADOW_Y_SCALE
DEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET
Constructor and Description |
---|
ItemizedIconOverlay(Context pContext,
List<Item> pList,
ItemizedIconOverlay.OnItemGestureListener<Item> pOnItemGestureListener) |
ItemizedIconOverlay(List<Item> pList,
Drawable pDefaultMarker,
ItemizedIconOverlay.OnItemGestureListener<Item> pOnItemGestureListener,
Context pContext) |
ItemizedIconOverlay(List<Item> pList,
ItemizedIconOverlay.OnItemGestureListener<Item> pOnItemGestureListener,
Context pContext) |
Modifier and Type | Method and Description |
---|---|
void |
addItem(int location,
Item item) |
boolean |
addItem(Item item) |
boolean |
addItems(List<Item> items) |
protected Item |
createItem(int index)
Method by which subclasses create the actual Items.
|
void |
onDetach(MapView mapView)
Override to perform clean up of resources before shutdown.
|
boolean |
onLongPress(MotionEvent event,
MapView mapView)
By default does nothing (
return false ). |
protected boolean |
onLongPressHelper(int index,
Item item) |
boolean |
onSingleTapConfirmed(MotionEvent event,
MapView mapView)
Each of these methods performs a item sensitive check.
|
protected boolean |
onSingleTapUpHelper(int index,
Item item,
MapView mapView) |
boolean |
onSnapToItem(int pX,
int pY,
Point pSnapPoint,
IMapView pMapView)
Checks to see if the given x and y are close enough to an item resulting in snapping the
current action (e.g.
|
void |
removeAllItems() |
void |
removeAllItems(boolean withPopulate) |
Item |
removeItem(int position) |
boolean |
removeItem(Item item) |
int |
size()
The number of items in this overlay.
|
boundToHotspot, calculateItemRect, draw, getDefaultMarker, getDisplayedItems, getDrawnItemsLimit, getFocus, getItem, hitTest, isEventOnItem, onDrawItem, onTap, populate, setDrawFocusedItem, setDrawnItemsLimit, setFocus, setOnFocusChangeListener
draw, drawAt, getBounds, getSafeMenuId, getSafeMenuIdSequence, isEnabled, onDoubleTap, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onPause, onResume, onScroll, onShowPress, onSingleTapUp, onTouchEvent, onTrackballEvent, setEnabled
protected List<Item extends OverlayItem> mItemList
protected ItemizedIconOverlay.OnItemGestureListener<Item extends OverlayItem> mOnItemGestureListener
public ItemizedIconOverlay(List<Item> pList, Drawable pDefaultMarker, ItemizedIconOverlay.OnItemGestureListener<Item> pOnItemGestureListener, Context pContext)
public ItemizedIconOverlay(List<Item> pList, ItemizedIconOverlay.OnItemGestureListener<Item> pOnItemGestureListener, Context pContext)
public ItemizedIconOverlay(Context pContext, List<Item> pList, ItemizedIconOverlay.OnItemGestureListener<Item> pOnItemGestureListener)
public void onDetach(MapView mapView)
Overlay
onDetach
in class ItemizedOverlay<Item extends OverlayItem>
public boolean onSnapToItem(int pX, int pY, Point pSnapPoint, IMapView pMapView)
Overlay.Snappable
pX
- The x in screen coordinates.pY
- The y in screen coordinates.pSnapPoint
- To be filled with the the interesting point (in screen coordinates) that is
closest to the given x and y. Can be untouched if not snapping.pMapView
- The MapView
that is requesting the snap. Use MapView.getProjection()
to convert between on-screen pixels and latitude/longitude pairs.protected Item createItem(int index)
ItemizedOverlay
createItem
in class ItemizedOverlay<Item extends OverlayItem>
public int size()
ItemizedOverlay
size
in class ItemizedOverlay<Item extends OverlayItem>
public boolean addItem(Item item)
public void addItem(int location, Item item)
public void removeAllItems()
public void removeAllItems(boolean withPopulate)
public boolean removeItem(Item item)
public Item removeItem(int position)
public boolean onSingleTapConfirmed(MotionEvent event, MapView mapView)
onSingleTapConfirmed
in class ItemizedOverlay<Item extends OverlayItem>
public boolean onLongPress(MotionEvent event, MapView mapView)
Overlay
return false
). If you handled the Event, return true
, otherwise return false
. If you returned true
none of the following Overlays
or the underlying MapView
has the chance to handle this event.onLongPress
in class Overlay
protected boolean onLongPressHelper(int index, Item item)