
public class LatLonGridlineOverlay2 extends Overlay
Overlay.Snappable| Modifier and Type | Field and Description |
|---|---|
protected DecimalFormat |
mDecimalFormatter |
protected Paint |
mLinePaint |
protected float |
mMultiplier |
protected GeoPoint |
mOptimizationGeoPoint |
protected Point |
mOptimizationPoint |
protected Paint |
mTextBackgroundPaint |
protected Paint |
mTextPaint |
mBounds, SHADOW_X_SKEW, SHADOW_Y_SCALEDEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET| Constructor and Description |
|---|
LatLonGridlineOverlay2() |
| Modifier and Type | Method and Description |
|---|---|
void |
draw(Canvas c,
Projection pProjection) |
protected double |
getIncrementor(int zoom)
this gets the distance in decimal degrees in between each line on the grid based on zoom level.
|
Paint |
getTextPaint()
getter for the Paint object.
|
void |
setBackgroundColor(int backgroundColor)
background color for the text labels
|
void |
setDecimalFormatter(DecimalFormat df) |
void |
setFontColor(int fontColor) |
void |
setFontSizeDp(short fontSizeDp) |
void |
setLineColor(int lineColor) |
void |
setLineWidth(float lineWidth) |
void |
setMultiplier(float multiplier)
default is 1, larger number = more lines on screen.
|
void |
setTextPaint(Paint paint)
if for some reason there's missing setter for this class and you don't want to subclass it,
you can override the paint object with this method.
|
void |
setTextStyle(Paint.Style paint)
sets the text label paint styler
see https://github.com/osmdroid/osmdroid/issues/1723
|
draw, drawAt, getBounds, getSafeMenuId, getSafeMenuIdSequence, isEnabled, onDetach, onDoubleTap, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onLongPress, onPause, onResume, onScroll, onShowPress, onSingleTapConfirmed, onSingleTapUp, onTouchEvent, onTrackballEvent, setEnabledprotected DecimalFormat mDecimalFormatter
protected float mMultiplier
protected Paint mLinePaint
protected Paint mTextBackgroundPaint
protected Paint mTextPaint
protected GeoPoint mOptimizationGeoPoint
protected Point mOptimizationPoint
public void draw(Canvas c, Projection pProjection)
public void setDecimalFormatter(DecimalFormat df)
public void setLineColor(int lineColor)
public void setFontColor(int fontColor)
public void setFontSizeDp(short fontSizeDp)
public void setTextStyle(Paint.Style paint)
paint - public void setTextPaint(Paint paint)
paint - public Paint getTextPaint()
public void setBackgroundColor(int backgroundColor)
public void setLineWidth(float lineWidth)
public void setMultiplier(float multiplier)
protected double getIncrementor(int zoom)
zoom - mapview's osm zoom level