com.drismo.gui
Class TripOverlay
java.lang.Object
org.osmdroid.views.overlay.Overlay
com.drismo.gui.TripOverlay
- All Implemented Interfaces:
- org.osmdroid.views.util.constants.OverlayConstants
public class TripOverlay
- extends org.osmdroid.views.overlay.Overlay
Overlay for the BasicMap an mapMonitor, draws the route.
Nested classes/interfaces inherited from class org.osmdroid.views.overlay.Overlay |
org.osmdroid.views.overlay.Overlay.Snappable |
Fields inherited from class org.osmdroid.views.overlay.Overlay |
mResourceProxy, mScale, SHADOW_X_SKEW, SHADOW_Y_SCALE |
Fields inherited from interface org.osmdroid.views.util.constants.OverlayConstants |
DEBUGMODE, DEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET |
Constructor Summary |
TripOverlay(android.content.Context applicationContext,
android.graphics.Bitmap drawable)
|
Method Summary |
protected void |
draw(android.graphics.Canvas canvas,
org.osmdroid.views.MapView mapView,
boolean b)
The drawing method |
void |
updateTripHistory(float[] lats,
float[] long1,
int[] colors)
Used to update the trip from arrays. |
void |
updateTripHistory(java.util.LinkedList<MapPoint> mapP)
updates the trip from a linkedlist of MapPoints. |
Methods inherited from class org.osmdroid.views.overlay.Overlay |
drawAt, getSafeMenuId, getSafeMenuIdSequence, isEnabled, onDetach, onDoubleTap, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onLongPress, onScroll, onShowPress, onSingleTapConfirmed, onSingleTapUp, onTouchEvent, onTrackballEvent, setEnabled |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mapPoints
private MapPoint[] mapPoints
lat
private float[] lat
longs
private float[] longs
color
private int[] color
drismobil
private android.graphics.Bitmap drismobil
paint
private android.graphics.Paint paint
lastPaint
private int lastPaint
TripOverlay
public TripOverlay(android.content.Context applicationContext,
android.graphics.Bitmap drawable)
- Parameters:
applicationContext
- The contextdrawable
- the bitmap to draw at the end (car)
draw
protected void draw(android.graphics.Canvas canvas,
org.osmdroid.views.MapView mapView,
boolean b)
- The drawing method
- Specified by:
draw
in class org.osmdroid.views.overlay.Overlay
- Parameters:
canvas
- the canvas to draw on.mapView
- The mapView, used to get the projectionb
- dummy
updateTripHistory
public void updateTripHistory(java.util.LinkedList<MapPoint> mapP)
- updates the trip from a linkedlist of MapPoints.
- Parameters:
mapP
- the linkedlist- See Also:
MapMonitor
updateTripHistory
public void updateTripHistory(float[] lats,
float[] long1,
int[] colors)
- Used to update the trip from arrays.
- Parameters:
lats
- array with all the latitudeslong1
- array with longitudescolors
- array with all the colors, matching the lats/long1- See Also:
BasicMap