目录

public final class UiSettings

Sets the built-in UI and gesture controls of a map.

Public Fields

None.

Constructor

None.

Public Method Summary

Return typeMethod name
booleanisCompassEnabled()
booleanisIndoorLevelPickerEnabled() (This method is not supported by the HUAWEI Map Kit SDK currently.)
booleanisMapToolbarEnabled() (This method is not supported by the HUAWEI Map Kit SDK currently.)
booleanisMyLocationButtonEnabled()
booleanisRotateGesturesEnabled()
booleanisScrollGesturesEnabled()
booleanisScrollGesturesEnabledDuringRotateOrZoom()
booleanisTiltGesturesEnabled()
booleanisZoomControlsEnabled()
booleanisZoomGesturesEnabled()
voidsetAllGesturesEnabled(boolean enabled)
voidsetCompassEnabled(boolean enabled)
voidsetIndoorLevelPickerEnabled(boolean enabled) (This method is not supported by the HUAWEI Map Kit SDK currently.)
voidsetMapToolbarEnabled(boolean enabled) (This method is not supported by the HUAWEI Map Kit SDK currently.)
voidsetMyLocationButtonEnabled(boolean enabled)
voidsetRotateGesturesEnabled(boolean enabled)
voidsetScrollGesturesEnabled(boolean enabled)
voidsetScrollGesturesEnabledDuringRotateOrZoom(boolean enabled)
voidsetTiltGesturesEnabled(boolean enabled)
voidsetZoomControlsEnabled(boolean enabled)
voidsetZoomGesturesEnabled(boolean enabled)

Public Methods

Method
public boolean isCompassEnabled()
Checks whether the compass is enabled for a map.


Parameters:
None.
Return:

Return typeParameter desc
booleanIf the compass is enabled, true is returned. Otherwise, false is returned.
Method
public boolean isMyLocationButtonEnabled()
Checks whether the my-location icon is enabled for a map.


Parameters:
None.
Return:

Return typeParameter desc
booleanIf the my-location icon is enabled, true is returned. Otherwise, false is returned.
Method
public boolean isRotateGesturesEnabled()
Checks whether rotate gestures are enabled for a map.


Parameters:
None.
Return:

Return typeParameter desc
booleanIf rotate gestures are enabled, true is returned. Otherwise, false is returned.
Method
public boolean isScrollGesturesEnabled()
Checks whether scroll gestures are enabled for a map.


Parameters:
None.
Return:

Return typeParameter desc
booleanIf scroll gestures are enabled, true is returned. Otherwise, false is returned.
Method
public boolean isScrollGesturesEnabledDuringRotateOrZoom()
Checks whether scroll gestures are enabled during rotation or zooming.


Parameters:
None.
Return:

Return typeParameter desc
booleanIf scroll gestures are enabled during rotation or zooming, true is returned. Otherwise, false is returned.
Method
public boolean isTiltGesturesEnabled()
Checks whether tilt gestures are enabled for a map.


Parameters:
None.
Return:

Return typeParameter desc
booleanIf tilt gestures are enabled, true is returned. Otherwise, false is returned.
Method
public boolean isZoomControlsEnabled()
Checks whether zoom controls are enabled for a map.


Parameters:
None.
Return:

Return typeParameter desc
booleanIf zoom controls are enabled, true is returned. Otherwise, false is returned.
Method
public boolean isZoomGesturesEnabled()
Checks whether zoom gestures are enabled for a map.


Parameters:
None.
Return:

Return typeParameter desc
booleanIf zoom gestures are enabled, true is returned. Otherwise, false is returned.
Method
public void setAllGesturesEnabled(boolean enabled)
Specifies whether to enable all gestures for a map.


Parameters:

Parameter nameParameter desc
enabledIndicates whether to enable all gestures. The options are true (yes) and false (no).


Return:
None.

Method
public void setCompassEnabled(boolean enabled)
Specifies whether to enable the compass for a map.

Sets whether to enable the compass for a map. If the compass is enabled and the map is not oriented to the due north, a compass icon is displayed in the upper right corner of the map. A user can tap the compass icon to rotate the map to be oriented to the due north. If the compass is enabled and the map is oriented to the due north, the compass icon is hidden. If the compass is disabled, the compass icon will never be displayed.


Parameters:

Parameter nameParameter desc
enabledIndicates whether to enable the compass. The options are true (yes) and false (no).


Return:
None.

Method
public void setMyLocationButtonEnabled(boolean enabled)
Specifies whether to enable the my-location icon for a map.


Parameters:

Parameter nameParameter desc
enabledIndicates whether to enable the my-location icon. The options are true (yes) and false (no).


Return:
None.

Method
public void setRotateGesturesEnabled(boolean enabled)
Specifies whether to enable rotate gestures for a map.


Parameters:

Parameter nameParameter desc
enabledIndicates whether to enable rotate gestures. The options are true (yes) and false (no).


Return:
None.

Method
public void setScrollGesturesEnabled(boolean enabled)
Specifies whether to enable scroll gestures for a map.


Parameters:

Parameter nameParameter desc
enabledIndicates whether to enable scroll gestures. The options are true (yes) and false (no).


Return:
None.

Method
public void setScrollGesturesEnabledDuringRotateOrZoom(boolean enabled)
Specifies whether to enable scroll gestures during rotation or zooming.


Parameters:

Parameter nameParameter desc
enabledIndicates whether to enable scroll gestures during rotation or zooming. The options are true (yes) and false (no).


Return:
None.

Method
public void setTiltGesturesEnabled(boolean enabled)
Specifies whether to enable tilt gestures for a map.


Parameters:

Parameter nameParameter desc
enabledIndicates whether to enable tilt gestures. The options are true (yes) and false (no).


Return:
None.

Method
public void setZoomControlsEnabled(boolean enabled)
Specifies whether to enable zoom controls for a map.


Parameters:

Parameter nameParameter desc
enabledIndicates whether to enable zoom controls. The options are true (yes) and false (no).


Return:
None.

Method
public void setZoomGesturesEnabled(boolean enabled)
Specifies whether to enable zoom gestures for a map.


Parameters:

Parameter nameParameter desc
enabledIndicates whether to enable zoom gestures. The options are true (yes) and false (no).


Return:
None.