Class: MapInteractionMode

MapInteractionMode(optionsopt)

new MapInteractionMode(optionsopt)

A mode for interacting with the map.

Parameters:
Name Type Attributes Description
options Object <optional>

Object with the following properties:

Properties
Name Type Attributes Description
onCancel function <optional>

The function to invoke if the user cancels the interaction mode. The cancel button will only appear if this property is specified.

message String <optional>

The message to display over the map while the interaction mode is active.

Source:

Members

buttonText :String

Set the text of the button for the dialog the message is displayed on.

Type:
  • String
Source:

customUi :Any

Gets or sets the details of a custom user interface for this map interaction mode. This property is not used by the MapInteractionMode itself, so it can be anything that is suitable for the user interface. In the standard React-based user interface included with TerriaJS, this property is a function that is called with no parameters and is expected to return a React component.

Type:
  • Any
Source:

drawRectangle :Boolean

Determines whether a rectangle will be requested from the user rather than a set of pickedFeatures.

Type:
  • Boolean
Source:

onCancel :function

Gets or sets a callback that is invoked when the user cancels the interaction mode. If this property is undefined, the interaction mode cannot be canceled.

Type:
  • function
Source:

pickedFeatures :PickedFeatures

Gets or sets the features that are currently picked.

Type:
Source:

Methods

message()

Gets or sets the html formatted message displayed on the map when in this mode.

Source: