public final class UiSettings
extends java.lang.Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
UiSettings.ScaleControlsUnit
比例尺单位枚举
Enumeration for scale control units |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getLogoPosition()
获取“高德地图”Logo的位置。
|
float |
getLogoSizeScale()
获取“高德地图”Logo的尺寸比例。
|
UiSettings.ScaleControlsUnit |
getScaleControlsUnit()
获取当前比例尺单位
Get the current unit used by the scale control. |
int |
getZoomPosition()
获取缩放按钮的位置。
|
boolean |
isCompassEnabled()
返回指南针控件是否可见。
|
boolean |
isGestureScaleByMapCenter()
返回是否以地图中心点缩放
Returns whether to zoom at the center of the map |
boolean |
isIndoorSwitchEnabled()
返回室内地图楼层切换控件是否显示。
|
protected boolean |
isLogoEnable() |
boolean |
isMyLocationButtonEnabled()
返回定位按钮是否可见。
|
boolean |
isRotateGesturesEnabled()
返回旋转手势是否可用。
|
boolean |
isScaleControlsEnabled()
返回比例尺控件是否可见。
|
boolean |
isScrollGesturesEnabled()
返回拖拽手势是否可用。
|
boolean |
isTiltGesturesEnabled()
返回倾斜手势是否可用。
|
boolean |
isZoomControlsEnabled()
返回缩放按钮是否可见。
|
boolean |
isZoomGesturesEnabled()
返回缩放手势是否可用。
|
void |
setAllGesturesEnabled(boolean enabled)
设置所有手势是否可用
Set whether all gestures are enabled |
void |
setCompassEnabled(boolean enabled)
设置指南针是否可见。
|
void |
setGestureScaleByMapCenter(boolean isGestureScaleByMapCenter)
设置是否以地图中心点缩放
注:优先级低于 AMap.setPointToCenter(int, int)
Sets whether to zoom at the center of the map Note: The priority is lower than AMap.setPointToCenter(int, int) |
void |
setIndoorSwitchEnabled(boolean isIndoorSwitchEnabled)
设置室内地图楼层切换控件是否可见。
|
void |
setLayoutDirectionRtl(boolean isRtl)
设置布局方向是否适配RTL(从右向左)
Set whether the layout direction adapts to RTL (Right-to-Left) |
void |
setLogoBottomMargin(int pixels)
设置Logo下边界距离屏幕底部的边距
Sets the margin of the bottom boundary of the logo from the bottom of the screen. |
void |
setLogoLeftMargin(int pixels)
设置Logo左边界距离屏幕左侧的边距
Sets the margin of the left boundary of the logo from the left side of the screen. |
void |
setLogoPosition(int position)
设置“高德地图”Logo的位置。
|
void |
setLogoSizeScale(float logoSizeScale)
设置“高德地图”Logo的尺寸比例。
|
void |
setMyLocationButtonEnabled(boolean enabled)
设置定位按钮是否可见。
|
void |
setRotateGesturesEnabled(boolean enabled)
设置旋转手势是否可用。
|
void |
setScaleControlsEnabled(boolean enabled)
设置比例尺控件是否可见
Set whether the scale control is visible |
void |
setScaleControlsPosition(android.graphics.Point position)
设置比例尺控件位置
Set the position of the scale control |
void |
setScaleControlsUnit(UiSettings.ScaleControlsUnit unit)
设置比例尺单位
Set the unit used by the scale control. |
void |
setScrollGesturesEnabled(boolean enabled)
设置拖拽手势是否可用。
|
void |
setTiltGesturesEnabled(boolean enabled)
设置倾斜手势是否可用。
|
void |
setZoomControlsEnabled(boolean enabled)
设置缩放按钮是否可见。
|
void |
setZoomGesturesEnabled(boolean enabled)
设置双指缩放手势是否可用。
|
void |
setZoomPosition(int position)
设置缩放按钮的位置。
|
public void setScaleControlsEnabled(boolean enabled)
enabled - true表示可见,false表示不可见。
public void setLayoutDirectionRtl(boolean isRtl)
isRtl - true表示适配RTL布局,false表示使用默认LTR布局。
public void setZoomControlsEnabled(boolean enabled)
enabled - true表示可见,false表示不可见。
public void setCompassEnabled(boolean enabled)
enabled - true表示可见,false表示不可见。
public void setMyLocationButtonEnabled(boolean enabled)
enabled - true表示可见,false表示不可见。
public void setScrollGesturesEnabled(boolean enabled)
enabled - true为可用; false 为不可用。
public void setZoomGesturesEnabled(boolean enabled)
enabled - true为可用; false 为不可用。
public void setTiltGesturesEnabled(boolean enabled)
enabled - true为可用; false 为不可用。
public void setRotateGesturesEnabled(boolean enabled)
enabled - true为可用; false 为不可用。
public void setAllGesturesEnabled(boolean enabled)
enabled - true为可用; false 为不可用。
public void setLogoPosition(int position)
position - 位置参数。屏幕左下角:AMapOptions.LOGO_POSITION_BOTTOM_LEFT 底部居中:AMapOptions.LOGO_POSITION_BOTTOM_CENTER 右下:AMapOptions.LOGO_MARGIN_RIGHT
AMapOptions.LOGO_POSITION_BOTTOM_LEFT Bottom center: AMapOptions.LOGO_POSITION_BOTTOM_CENTER Bottom-right: AMapOptions.LOGO_MARGIN_RIGHTpublic void setLogoSizeScale(float logoSizeScale)
Logo的显示宽高为当前实际Logo图片宽高乘以该比例。默认值为1.0。
The displayed width and height of the logo are the current actual logo bitmap width and height multiplied by this ratio. The default value is 1.0.
logoSizeScale - Logo尺寸比例。小于等于0或非法值时恢复为默认值1.0。
public void setZoomPosition(int position)
position - 右边界中部:AMapOptions.ZOOM_POSITION_RIGHT_CENTER 右下:AMapOptions.ZOOM_POSITION_RIGHT_BOTTOM。
AMapOptions.ZOOM_POSITION_RIGHT_CENTER Bottom-right: AMapOptions.ZOOM_POSITION_RIGHT_BOTTOM.public int getZoomPosition()
AMapOptions.ZOOM_POSITION_RIGHT_CENTER 右下:AMapOptions.ZOOM_POSITION_RIGHT_BOTTOM。
AMapOptions.ZOOM_POSITION_RIGHT_CENTER Bottom-right: AMapOptions.ZOOM_POSITION_RIGHT_BOTTOM.public boolean isScaleControlsEnabled()
public boolean isZoomControlsEnabled()
public boolean isCompassEnabled()
public boolean isMyLocationButtonEnabled()
public boolean isScrollGesturesEnabled()
public boolean isZoomGesturesEnabled()
public boolean isTiltGesturesEnabled()
public boolean isRotateGesturesEnabled()
public int getLogoPosition()
AMapOptions.LOGO_POSITION_BOTTOM_LEFT 底部居中:AMapOptions.LOGO_POSITION_BOTTOM_CENTER 右下:AMapOptions.LOGO_MARGIN_RIGHT
AMapOptions.LOGO_POSITION_BOTTOM_LEFT Bottom center: AMapOptions.LOGO_POSITION_BOTTOM_CENTER Bottom-right: AMapOptions.LOGO_MARGIN_RIGHTpublic float getLogoSizeScale()
public boolean isIndoorSwitchEnabled()
public void setIndoorSwitchEnabled(boolean isIndoorSwitchEnabled)
isIndoorSwitchEnabled - true 为可见;false 不可见。
public final void setLogoLeftMargin(int pixels)
pixels - 像素public final void setLogoBottomMargin(int pixels)
pixels - 像素public void setGestureScaleByMapCenter(boolean isGestureScaleByMapCenter)
AMap.setPointToCenter(int, int)
AMap.setPointToCenter(int, int)isGestureScaleByMapCenter - true:以地图中心的进行缩放,false:不以地图中心的进行缩放
public boolean isGestureScaleByMapCenter()
protected boolean isLogoEnable()
public void setScaleControlsPosition(android.graphics.Point position)
position - 位置坐标,传入 null 时保持默认位置
public void setScaleControlsUnit(UiSettings.ScaleControlsUnit unit)
unit - 单位类型
public UiSettings.ScaleControlsUnit getScaleControlsUnit()