com.drismo.gui
Class TripOverlay

java.lang.Object
  extended by org.osmdroid.views.overlay.Overlay
      extended by 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 Class Summary
 
Nested classes/interfaces inherited from class org.osmdroid.views.overlay.Overlay
org.osmdroid.views.overlay.Overlay.Snappable
 
Field Summary
private  int[] color
           
private  android.graphics.Bitmap drismobil
           
private  int lastPaint
           
private  float[] lat
           
private  float[] longs
           
private  MapPoint[] mapPoints
           
private  android.graphics.Paint paint
           
 
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
 

Field Detail

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
Constructor Detail

TripOverlay

public TripOverlay(android.content.Context applicationContext,
                   android.graphics.Bitmap drawable)
Parameters:
applicationContext - The context
drawable - the bitmap to draw at the end (car)
Method Detail

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 projection
b - 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 latitudes
long1 - array with longitudes
colors - array with all the colors, matching the lats/long1
See Also:
BasicMap