public final class

UiSettings

extends Object
java.lang.Object
   ↳ com.amazon.geo.mapsv2.UiSettings

Class Overview

Contains the user interface settings for the map. Use getUiSettings() to access this object and change the user interface options.

Summary

Public Methods
boolean isCompassEnabled()
Retrieves a boolean value indicating whether the compass user interface is enabled.
boolean isIndoorLevelPickerEnabled()
Retrieves a boolean value indicating whether the indoor level picker UI for indoor maps is enabled.

Note that indoor buildings are not currently supported in the Amazon Maps API.

boolean isMapToolbarEnabled()
Retrieves a boolean value indicating whether the Map Toolbar is enabled.
boolean isMyLocationButtonEnabled()
Retrieves a boolean value indicating whether the "Locate Me" UI is enabled.
boolean isRotateGesturesEnabled()
Retrieves a boolean value indicating whether rotate gestures are enabled.
boolean isScrollGesturesEnabled()
Retrieves a boolean value indicating whether scroll gestures are enabled.
boolean isTiltGesturesEnabled()
Retrieves a boolean value indicating whether tilt gestures are enabled.
boolean isZoomControlsEnabled()
Retrieves a boolean value indicating whether the zoom control user interface is enabled.
boolean isZoomGesturesEnabled()
Retrieves a boolean value indicating whether zoom gestures are enabled.
void setAllGesturesEnabled(boolean enabled)
Enables or disables all gestures (rotate, scroll, tilt, and zoom gestures).
void setCompassEnabled(boolean enabled)
Enables or disables the compass user interface.
void setIndoorLevelPickerEnabled(boolean enabled)
Enables or disables the level picker user interface for indoor maps.

Note that indoor buildings are not currently supported in the Amazon Maps API.

void setMapToolbarEnabled(boolean enabled)
Enables or disables the Map Toolbar.
void setMyLocationButtonEnabled(boolean enabled)
Enables or disables the "Locate Me" user interface.
void setRotateGesturesEnabled(boolean enabled)
Enables or disables user rotate gestures.
void setScrollGesturesEnabled(boolean enabled)
Enables or disables user scroll gestures.
void setTiltGesturesEnabled(boolean enabled)
Enables or disables user tilt gestures.
void setZoomControlsEnabled(boolean enabled)
Enables or disables zoom user interface controls.
void setZoomGesturesEnabled(boolean enabled)
Enables or disables user zoom gestures.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public boolean isCompassEnabled ()

Retrieves a boolean value indicating whether the compass user interface is enabled.

When the compass is enabled, the map displays a compass icon whenever the map camera is rotated away from normal (tilt = 0 and bearing = 0). Clicking the compass icon re-orients the map to normal and causes the icon to disappear.

Returns
  • true if the compass UI is enabled, false if it is disabled.

public boolean isIndoorLevelPickerEnabled ()

Retrieves a boolean value indicating whether the indoor level picker UI for indoor maps is enabled.

Note that indoor buildings are not currently supported in the Amazon Maps API.

Returns
  • true if the indoor level picker UI is enabled, false if it is disabled.

public boolean isMapToolbarEnabled ()

Retrieves a boolean value indicating whether the Map Toolbar is enabled.

Returns
  • true if the Map Toolbar is enabled, false if it is disabled.

public boolean isMyLocationButtonEnabled ()

Retrieves a boolean value indicating whether the "Locate Me" UI is enabled.

Returns
  • true if the "Locate Me" UI button UI is enabled, false if it is disabled.

public boolean isRotateGesturesEnabled ()

Retrieves a boolean value indicating whether rotate gestures are enabled.

Returns
  • true if rotate gestures are enabled, false if they are disabled.

public boolean isScrollGesturesEnabled ()

Retrieves a boolean value indicating whether scroll gestures are enabled.

Returns
  • true if scroll gestures are enabled, false they are disabled.

public boolean isTiltGesturesEnabled ()

Retrieves a boolean value indicating whether tilt gestures are enabled.

Returns
  • true if tilt gestures are enabled, false they are disabled.

public boolean isZoomControlsEnabled ()

Retrieves a boolean value indicating whether the zoom control user interface is enabled.

Returns
  • true if zoom controls are enabled, false they are disabled.

public boolean isZoomGesturesEnabled ()

Retrieves a boolean value indicating whether zoom gestures are enabled.

Returns
  • true if zoom gestures are enabled, false they are disabled.

public void setAllGesturesEnabled (boolean enabled)

Enables or disables all gestures (rotate, scroll, tilt, and zoom gestures). Default is true.

Parameters
enabled true to enable all gestures, or false to disable them.

public void setCompassEnabled (boolean enabled)

Enables or disables the compass user interface. Default is true.

When the compass is enabled, the map displays a compass icon whenever the map camera is rotated away from normal (tilt = 0 and bearing = 0). Clicking the compass icon re-orients the map to normal and causes the icon to disappear.

If disabled, the compass does not display, regardless of the map camera's orientation.

Parameters
enabled true to enable the compass UI, or false to disable it.

public void setIndoorLevelPickerEnabled (boolean enabled)

Enables or disables the level picker user interface for indoor maps. The default behavior is true.

Note that indoor buildings are not currently supported in the Amazon Maps API.

Parameters
enabled true to enable the level picker, or false to disable it.

public void setMapToolbarEnabled (boolean enabled)

Enables or disables the Map Toolbar. When enabled, additional buttons are displayed at the bottom of the map when the user clicks a Marker. These buttons let users launch the Amazon Maps app at the location of the selected Marker or get directions to Marker's location. Note that the buttons are hidden if the Marker is moved off the screen.

The default is true.

Parameters
enabled true to enable the Map Toolbar, or false to disable it.

public void setMyLocationButtonEnabled (boolean enabled)

Enables or disables the "Locate Me" user interface. The "Locate Me" button animates the camera to center on the user's location. The default is true.

Note that the "Locate Me" button is only shown when the My Location layer is enabled. Use setMyLocationEnabled(boolean) to enable or disable the My Location layer.

You can change the behavior of the "Locate Me" button by implementing the AmazonMap.OnMyLocationButtonClickListener interface and assigning it with setOnMyLocationButtonClickListener(AmazonMap.OnMyLocationButtonClickListener)

Parameters
enabled true to enable the "Locate Me" button, or false to disable it.

public void setRotateGesturesEnabled (boolean enabled)

Enables or disables user rotate gestures. Default is true.

Parameters
enabled true to enable rotate gestures, or false to disable them.

public void setScrollGesturesEnabled (boolean enabled)

Enables or disables user scroll gestures. Default is true.

Parameters
enabled true to enable scroll gestures, or false to disable them.

public void setTiltGesturesEnabled (boolean enabled)

Enables or disables user tilt gestures. Default is true.

Parameters
enabled true to enable tilt gestures, or false to disable them.

public void setZoomControlsEnabled (boolean enabled)

Enables or disables zoom user interface controls. Default is false.

Parameters
enabled true to enable the zoom UI controls, or false to disable them.

public void setZoomGesturesEnabled (boolean enabled)

Enables or disables user zoom gestures. Default is true.

Parameters
enabled true to enable zoom gestures, or false to disable them.