愿你出走半生,归来仍是少年!
通过创建这个实例并添加到MapView中后,会在地图上出现一个随着缩放等级变换的比例尺控件。
通过其方法可进行位置、单位等等参数设置。
Modifier and Type | Method | Description |
---|---|---|
void | setMinZoom(double zoom) | Sets the minimum zoom level for the scale bar to be drawn. |
ScaleBarOverlay.UnitsOfMeasure | getUnitsOfMeasure() | Gets the units of measure to be shown in the scale bar |
void | setUnitsOfMeasure(ScaleBarOverlay.UnitsOfMeasure unitsOfMeasure) | Sets the units of measure to be shown in the scale bar |
void | setAlignBottom(boolean alignBottom) | |
void | setAlignRight(boolean alignRight) | |
Paint | getBarPaint() | Return's the paint used to draw the bar |
void | setBarPaint(Paint pBarPaint) | Sets the paint for drawing the bar |
Paint | getTextPaint() | Returns the paint used to draw the text |
void | setTextPaint(Paint pTextPaint) | Sets the paint for drawing the text |
void | setCentred(boolean centred) | Flag to draw the bar centered around the set offset coordinates or to the right/bottom of thecoordinates (default) |
void | setMaxLength(float pMaxLengthInCm) | Sets the maximum bar length. |
void | setScaleBarOffset(int x, int y) | Sets the scale bar screen offset for the bar. |
void | setLineWidth(float width) | Sets the bar's line width. |
void | setTextSize(float size) | Sets the text size. |
void | drawLatitudeScale(boolean latitude) | Latitudinal / horizontal scale bar flag |
void | drawLongitudeScale(boolean longitude) | Longitudinal / vertical scale bar flag |
void | setBackgroundPaint(Paint pBgPaint) | Sets the background paint. |
void | setEnableAdjustLength(boolean adjustLength) | If enabled, the bar will automatically adjust the length to reflect a round number (startingwith 1, 2 or 5). |
void | draw(Canvas c, Projection projection) | |
void | disableScaleBar() | |
void | enableScaleBar() | |
void | onDetach(MapView mapView) | Override to perform clean up of resources before shutdown. |
static String | getScaleString(Context pContext, String pValue, GeoConstants.UnitOfMeasure pUnitOfMeasure) |