public class IconOverlay extends Overlay
IconOverlay
is an icon placed at a particular
IGeoPoint
on the MapView
's surface.
Inspired by Marker
but without the Datafields and the pop-window support.
Created by k3b on 16.07.2015.Overlay.Snappable
Modifier and Type | Field and Description |
---|---|
static float |
ANCHOR_BOTTOM
Usual values in the (U,V) coordinates system of the icon image
|
static float |
ANCHOR_CENTER
Usual values in the (U,V) coordinates system of the icon image
|
static float |
ANCHOR_LEFT
Usual values in the (U,V) coordinates system of the icon image
|
static float |
ANCHOR_RIGHT
Usual values in the (U,V) coordinates system of the icon image
|
static float |
ANCHOR_TOP
Usual values in the (U,V) coordinates system of the icon image
|
protected float |
mAlpha |
protected float |
mAnchorU |
protected float |
mAnchorV |
protected float |
mBearing |
protected boolean |
mFlat |
protected Drawable |
mIcon |
protected IGeoPoint |
mPosition |
protected Point |
mPositionPixels |
mBounds, SHADOW_X_SKEW, SHADOW_Y_SCALE
DEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET
Constructor and Description |
---|
IconOverlay()
save to be called in non-gui-thread
|
IconOverlay(IGeoPoint position,
Drawable icon)
save to be called in non-gui-thread
|
Modifier and Type | Method and Description |
---|---|
void |
draw(Canvas canvas,
Projection pj)
Draw the icon.
|
IGeoPoint |
getPosition() |
IconOverlay |
moveTo(IGeoPoint position,
MapView mapView) |
IconOverlay |
moveTo(MotionEvent event,
MapView mapView) |
IconOverlay |
set(IGeoPoint position,
Drawable icon) |
draw, drawAt, getBounds, getSafeMenuId, getSafeMenuIdSequence, isEnabled, onDetach, onDoubleTap, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onLongPress, onPause, onResume, onScroll, onShowPress, onSingleTapConfirmed, onSingleTapUp, onTouchEvent, onTrackballEvent, setEnabled
public static final float ANCHOR_CENTER
public static final float ANCHOR_LEFT
public static final float ANCHOR_TOP
public static final float ANCHOR_RIGHT
public static final float ANCHOR_BOTTOM
protected Drawable mIcon
protected IGeoPoint mPosition
protected float mBearing
protected float mAnchorU
protected float mAnchorV
protected float mAlpha
protected boolean mFlat
protected Point mPositionPixels
public void draw(Canvas canvas, Projection pj)
public IGeoPoint getPosition()
public IconOverlay set(IGeoPoint position, Drawable icon)
public IconOverlay moveTo(MotionEvent event, MapView mapView)
public IconOverlay moveTo(IGeoPoint position, MapView mapView)