RulerOverlay

public class RulerOverlay extends Overlay implements MapViewEventListener

Fields

BUNDLE_GEOMETRY

protected static final String BUNDLE_GEOMETRY

mListener

protected OnRulerChanged mListener

mMeasuring

protected boolean mMeasuring

mPaint

protected Paint mPaint

mRulerItem

protected DrawItem mRulerItem

mRulerPolygon

protected GeoPolygon mRulerPolygon

mRulerString

protected GeoLineString mRulerString

mTempPointOffset

protected PointF mTempPointOffset

mTolerancePX

protected final float mTolerancePX

Constructors

RulerOverlay

public RulerOverlay(Context context, MapViewOverlays mapViewOverlays)

Methods

draw

public void draw(Canvas canvas, MapDrawable mapDrawable)

drawClosingLine

protected void drawClosingLine(Canvas canvas, DrawItem drawItem)

drawOnPanning

public void drawOnPanning(Canvas canvas, PointF currentMouseOffset)

drawOnZooming

public void drawOnZooming(Canvas canvas, PointF currentFocusLocation, float scale)

fillDrawItem

protected void fillDrawItem()

fillGeometry

protected void fillGeometry()

getArea

public double getArea()

getLength

public double getLength()

isMeasuring

public boolean isMeasuring()

onExtentChanged

public void onExtentChanged(float zoom, GeoPoint center)

onLayerAdded

public void onLayerAdded(int id)

onLayerChanged

public void onLayerChanged(int id)

onLayerDeleted

public void onLayerDeleted(int id)

onLayerDrawFinished

public void onLayerDrawFinished(int id, float percent)

onLayerDrawStarted

public void onLayerDrawStarted()

onLayersReordered

public void onLayersReordered()

onLongPress

public void onLongPress(MotionEvent event)

onRestoreState

public void onRestoreState(Bundle bundle)

onSaveState

public Bundle onSaveState()

onSingleTapUp

public void onSingleTapUp(MotionEvent event)

panMoveTo

public void panMoveTo(MotionEvent e)

panStart

public void panStart(MotionEvent event)

panStop

public void panStop()

startMeasuring

public void startMeasuring(OnRulerChanged listener, GeoPoint currentCenter)

stopMeasuring

public void stopMeasuring()