MapController.Builder

public final class MapController.Builder


A builder of MapController.

Summary

Public constructors

Public methods

@NonNull MapController

Constructs the MapController defined by this builder.

@NonNull MapController.Builder

Sets an ActionStrip with a list of map-control related actions for the active template, such as pan or zoom.

@NonNull MapController.Builder

Sets a PanModeListener that notifies when the user enters and exits the pan mode.

Public constructors

Builder

Added in 1.2.0
public Builder()

Public methods

build

Added in 1.2.0
public @NonNull MapController build()

Constructs the MapController defined by this builder.

setMapActionStrip

Added in 1.2.0
public @NonNull MapController.Builder setMapActionStrip(@NonNull ActionStrip actionStrip)

Sets an ActionStrip with a list of map-control related actions for the active template, such as pan or zoom.

The host will draw the buttons in an area that is associated with map controls.

If the app does not include the PAN button in this ActionStrip, the app will not receive the user input for panning gestures from SurfaceCallback methods, and the host will exit any previously activated pan mode.

Requirements This component allows up to 4 Actions in its map ActionStrip. Only Actions with icons set via setIcon are allowed.
Throws
java.lang.IllegalArgumentException

if actionStrip does not meet the component's requirements

java.lang.NullPointerException

if actionStrip is null

setPanModeListener

Added in 1.2.0
public @NonNull MapController.Builder setPanModeListener(@NonNull PanModeListener panModeListener)

Sets a PanModeListener that notifies when the user enters and exits the pan mode.

If the app does not include the PAN button in the map ActionStrip, the app will not receive the user input for panning gestures from SurfaceCallback methods, and the host will exit any previously activated pan mode.

Throws
java.lang.NullPointerException

if panModeListener is null