MapInteractionMode

MapInteractionMode

new MapInteractionMode(optionsopt)

Source:

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.

Members

buttonText :String

Source:

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

Type:
  • String

customUi :Any

Source:

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

drawRectangle :Boolean

Source:

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

Type:
  • Boolean

onCancel :function

Source:

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

pickedFeatures :PickedFeatures

Source:

Gets or sets the features that are currently picked.

Type:

Methods

message()

Source:

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