public class LatLonGridlineOverlay2 extends Overlay
Overlay.Snappable
Modifier and Type | Field and Description |
---|---|
protected DecimalFormat |
mDecimalFormatter |
protected int |
mFontBackgroundColor |
protected int |
mFontColor |
protected short |
mFontSizeDp |
protected FolderOverlay |
mLastOverlay |
protected int |
mLineColor |
protected float |
mLineWidth |
protected float |
mMultiplier |
mBounds, SHADOW_X_SKEW, SHADOW_Y_SCALE
DEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET
Constructor and Description |
---|
LatLonGridlineOverlay2() |
Modifier and Type | Method and Description |
---|---|
protected void |
applyMarkerAttributes(Marker m) |
void |
draw(Canvas c,
MapView osmv,
boolean shadow)
Draw the overlay over the map.
|
protected double |
getIncrementor(int zoom)
this gets the distance in decimal degrees in between each line on the grid based on zoom level.
|
protected FolderOverlay |
getLatLonGrid(MapView mapView) |
protected double[] |
getStartEndPointsNS(double north,
double south,
int zoom)
gets the start and end points for a latitude line
|
protected double[] |
getStartEndPointsWE(double west,
double east,
int zoom)
gets the start and stop point for a longitude line
|
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.
|
draw, drawAt, getBounds, getSafeMenuId, getSafeMenuIdSequence, isEnabled, onDetach, onDoubleTap, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onLongPress, onPause, onResume, onScroll, onShowPress, onSingleTapConfirmed, onSingleTapUp, onTouchEvent, onTrackballEvent, setEnabled
protected DecimalFormat mDecimalFormatter
protected int mLineColor
protected int mFontColor
protected short mFontSizeDp
protected int mFontBackgroundColor
protected float mLineWidth
protected float mMultiplier
protected FolderOverlay mLastOverlay
public void draw(Canvas c, MapView osmv, boolean shadow)
Overlay
Overlay.draw(Canvas, Projection)
instead (cf. MapSnapshot
public void setDecimalFormatter(DecimalFormat df)
public void setLineColor(int lineColor)
public void setFontColor(int fontColor)
public void setFontSizeDp(short fontSizeDp)
public void setBackgroundColor(int backgroundColor)
backgroundColor
- public void setLineWidth(float lineWidth)
public void setMultiplier(float multiplier)
multiplier
- protected void applyMarkerAttributes(Marker m)
protected FolderOverlay getLatLonGrid(MapView mapView)
protected double[] getStartEndPointsNS(double north, double south, int zoom)
north
- south
- zoom
- protected double[] getStartEndPointsWE(double west, double east, int zoom)
west
- east
- zoom
- protected double getIncrementor(int zoom)
zoom
- mapview's osm zoom level