MapController.Builder


class MapController.Builder


A builder of MapController.

Summary

Public constructors

Public functions

MapController

Constructs the MapController defined by this builder.

MapController.Builder

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

MapController.Builder

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

Public constructors

Builder

Added in 1.2.0
Builder()

Public functions

build

Added in 1.2.0
fun build(): MapController

Constructs the MapController defined by this builder.

setMapActionStrip

Added in 1.2.0
fun setMapActionStrip(actionStrip: ActionStrip): MapController.Builder

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
fun setPanModeListener(panModeListener: PanModeListener): MapController.Builder

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