MapUserInterfaceOptions Class

Note

Bing Maps SDK for Android and iOS retirement

Bing Maps SDK for Android and iOS is deprecated and will be retired. Free (Basic) account customers can continue to use Bing Maps SDK for Android and iOS until June 30th, 2025. Enterprise account customers can continue to use Bing Maps SDK for Android and iOS until June 30th, 2028. To avoid service disruptions, all implementations using Bing Maps SDK for Android and iOS will need to be updated to use Azure Maps Web SDK by the retirement date that applies to your Bing Maps for Enterprise account type.

Azure Maps is Microsoft's next-generation maps and geospatial services for developers. Azure Maps has many of the same features as Bing Maps for Enterprise, and more. To get started with Azure Maps, create a free Azure subscription and an Azure Maps account. For more information about azure Maps, see Azure Maps Documentation. For migration guidance, see Bing Maps Migration Overview.

A container class for various properties that can be used to configure interactivity for the control.

Android

public class MapUserInterfaceOptions

iOS

@interface MSMapUserInterfaceOptions : NSObject

Properties

CompassButtonAlignment

The horizontal and vertical alignment of the compass button within the map.

Android

setCompassButtonAlignment(
  MapToolbarHorizontalAlignment horizontalAlignment,
  MapToolbarVerticalAlignment verticalAlignment)

iOS

- (void)setCompassButtonHorizontalAlignment:(MSMapToolbarHorizontalAlignment)horizontalAlignment verticalAlignment:(MSMapToolbarVerticalAlignment)verticalAlignment

See also: MapToolbarHorizontalAlignment enumeration See also: MapToolbarVerticalAlignment enumeration

CompassButtonVisible

Whether the compass is displayed.

Android

boolean isCompassButtonVisible()
void setCompassButtonVisible(boolean visible)

iOS

@property (nonatomic) BOOL compassButtonVisible

StylePickerButtonAlignment

The horizontal and vertical alignment of the style picker button within the map.

Android

setStylePickerButtonAlignment(
  MapToolbarHorizontalAlignment horizontalAlignment,
  MapToolbarVerticalAlignment verticalAlignment)

iOS

- (void)setStylePickerButtonHorizontalAlignment:(MSMapToolbarHorizontalAlignment)horizontalAlignment verticalAlignment:(MSMapToolbarVerticalAlignment)verticalAlignment

See also: MapToolbarHorizontalAlignment enumeration See also: MapToolbarVerticalAlignment enumeration

StylePickerButtonVisible

Whether the style picker button is displayed.

Android

boolean isStylePickerButtonVisible()
void setStylePickerButtonVisible(boolean visible)

iOS

@property (nonatomic) BOOL stylePickerButtonVisible

TiltButtonAlignment

The horizontal and vertical alignment of the tilt button within the map.

Android

setTiltButtonAlignment(
  MapToolbarHorizontalAlignment horizontalAlignment,
  MapToolbarVerticalAlignment verticalAlignment)

iOS

- (void)setTiltButtonHorizontalAlignment:(MSMapToolbarHorizontalAlignment)horizontalAlignment verticalAlignment:(MSMapToolbarVerticalAlignment)verticalAlignment

See also: MapToolbarHorizontalAlignment enumeration See also: MapToolbarVerticalAlignment enumeration

TiltButtonVisible

Whether the tilt button is displayed.

Android

boolean isTiltButtonVisible()
void setTiltButtonVisible(boolean visible)

iOS

@property (nonatomic) BOOL tiltButtonVisible

UserLocationButtonAlignment

The horizontal and vertical alignment of the user location button within the map.

Android

setUserLocationButtonAlignment(
  MapToolbarHorizontalAlignment horizontalAlignment,
  MapToolbarVerticalAlignment verticalAlignment)

iOS

- (void)setUserLocationButtonHorizontalAlignment:(MSMapToolbarHorizontalAlignment)horizontalAlignment verticalAlignment:(MSMapToolbarVerticalAlignment)verticalAlignment

See also: MapToolbarHorizontalAlignment enumeration See also: MapToolbarVerticalAlignment enumeration

UserLocationButtonVisible

Whether the user location button is displayed.

Android

boolean isUserLocationButtonVisible()
void setUserLocationButtonVisible(boolean visible)

iOS

@property (nonatomic) BOOL userLocationButtonVisible

ZoomButtonsAlignment

The horizontal and vertical alignment of the zoom buttons within the map.

Android

setZoomButtonsAlignment(
  MapToolbarHorizontalAlignment horizontalAlignment,
  MapToolbarVerticalAlignment verticalAlignment)

iOS

- (void)setZoomButtonsHorizontalAlignment:(MSMapToolbarHorizontalAlignment)horizontalAlignment verticalAlignment:(MSMapToolbarVerticalAlignment)verticalAlignment

See also: MapToolbarHorizontalAlignment enumeration See also: MapToolbarVerticalAlignment enumeration

ZoomButtonsVisible

Whether the zoom in and zoom out buttons are displayed.

Android

boolean isZoomButtonsVisible()
void setZoomButtonsVisible(final boolean visible)

iOS

@property (nonatomic) BOOL zoomButtonsVisible

PanGestureEnabled

Whether a user can pan (scroll) the map around using gestures

Android

boolean isPanGestureEnabled()
void setPanGestureEnabled(boolean enabled)

iOS

@property (nonatomic) BOOL panGestureEnabled

RotateGestureEnabled

Whether a user can use a twisting rotate finger gesture to rotate out of north-up

Android

boolean isRotateGestureEnabled()
void setRotateGestureEnabled(boolean enabled)

iOS

@property (nonatomic) BOOL rotateGestureEnabled

TiltGestureEnabled

Whether a user can use a two-finger gesture to tilt in and out of nadir views.

Android

boolean isTiltGestureEnabled()
void setTiltGestureEnabled(boolean enabled)

iOS

@property (nonatomic) BOOL tiltGestureEnabled

ZoomGestureEnabled

Whether a user can use a two-finger gesture to zoom in and out of the map.

Android

boolean isZoomGestureEnabled()
void setZoomGestureEnabled(boolean enabled)

iOS

@property (nonatomic) BOOL zoomGestureEnabled

CopyrightDisplay

Controls whether copyright is displayed on mobile form factor sized map views.

Android

CopyrightDisplay getCopyrightDisplay()
void setCopyrightDisplay(CopyrightDisplay copyrightDisplay)

iOS

@property (nonatomic) MSCopyrightDisplay copyrightDisplay

See also: CopyrightDisplay enumeration

SaveMapUserPreferences

Controls whether style and traffic preferences selected through the style picker are saved. If enabled, the user's style preferences should be persisted and restored on subsequent sessions.

Android

boolean isSaveMapUserPreferencesEnabled()
void setSaveMapUserPreferencesEnabled(boolean enabled)

iOS

@property(nonatomic) BOOL saveMapUserPreferencesEnabled

Methods

ClearMapUserPreferences

Clears the user's preferences from memory.

Android

void clearMapUserPreferences()

iOS

- (void)clearMapUserPreferences;

Events

MapStylePickerSelectedStyleChanged

Fired when a style is selected in the map style picker, or a previous selection is being restored.

Android

void setOnMapStylePickerSelectedStyleChangedListener(OnMapStylePickerSelectedStyleChangedListener listener)

See also: OnMapStylePickerSelectedStyleChangedListener

iOS

- (void)setUserDidSelectStyleHandler:(MSMapUserDidSelectStyleHandler)handler

See also: MSMapUserDidSelectStyleHandler

MapStylePickerTrafficSwitchToggled

Fired when the switch is toggled in the map style picker, or a previous toggle is being restored.

Android

void setOnMapStylePickerTrafficSwitchToggledListener(OnMapStylePickerTrafficSwitchToggledListener listener)

See also: OnMapStylePickerTrafficSwitchToggledListener

iOS

- (void)setUserDidToggleTrafficSwitch:(MSMapUserDidToggleTrafficSwitchHandler)handler

See also: MSMapUserDidToggleTrafficSwitchHandler