Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Constructors

constructor

  • Initializes a new instance of the {@link geocortex.essentialsHtmlViewer.mapping.infrastructure.tools.MapTool} class.

    class

    MapTool provides a general purpose, loosely coupled model for creating components that require map interaction.

    constructs
    memberof

    geocortex.essentialsHtmlViewer.mapping.infrastructure.tools

    Parameters

    • app: ViewerApplication

      The {@link geocortex.essentialsHtmlViewer.ViewerApplication} that this tool belongs to.

    • mixin: MapToolConfig

      An object to provide additional configuration of this tool.

    Returns MapTool

Properties

_drawIsActive

_drawIsActive: boolean

The activate state of the Esri drawing surface. The Esri drawing surface does not provide an indication of whether it is active or not. We'll keep track of this state ourselves so that we don't call deactivate unnecessarily.

_drawObject

_drawObject: Draw

The Esri drawing surface.

Protected _inputMethodChangeHandle

_inputMethodChangeHandle: RemovableHandle

app

The {@link geocortex.essentialsHtmlViewer.ViewerApplication} that this tool instance belongs to.

closeTitle

closeTitle: string

Optional title for the close tool UI element. Defaults to "Deactivate Tool".

command

command: string

The command name associated with this tool.

type

{string}

drawMode

drawMode: string

The draw mode of this tool.

enabled

enabled: Observable<boolean>

Whether the tool is enabled (can be used). The tool will be assumed to not support disabling if left undefined.

iconUri

iconUri: string

Optional URI of the icon to display with the status.

isActive

isActive: boolean

Whether this tool is active.

type

{boolean}

isSticky

isSticky: boolean

Whether this tool is sticky.

type

{boolean}

keyboardStatusText

keyboardStatusText: string

Optional, alternate status text to display for keyboard users. Can be i18ned.

libraryId

libraryId: string

Library to look up i18n string keys from. Required to display i18n strings.

name

name: string

The name of this tool.

type

{string}

statusClass

statusClass: string

Optional CSS class for the status displayed for this tool.

statusText

statusText: string

Status text to display while the tool is active. Can be i18ned.

Methods

onActivated

  • onActivated(): boolean
  • Called when the tool is activated.

    Returns boolean

onDeactivated

  • onDeactivated(): void
  • Called when the tool is deactivated.

    Returns void

onDrawEnd

  • onDrawEnd(geometry: Geometry | object): void
  • Called when drawing completes. Now handling 'onDrawComplete' instead of deprecated 'onDrawEnd', though still checking for both payloads

    Parameters

    • geometry: Geometry | object

    Returns void

onInputMethodChange

  • onInputMethodChange(result: object): void
  • Called when the input method (e.g. keyboard, mouse) for the drawing component has changed.

    Parameters

    • result: object
      • newMethod: string
      • previousMethod: string

    Returns void

onMapMouseDown

  • onMapMouseDown(evt: MouseEvent): void
  • Parameters

    • evt: MouseEvent

    Returns void

onMapMouseHover

  • Parameters

    Returns void

setActive

  • setActive(active: boolean): void
  • Sets the active state of the tool.

    Parameters

    • active: boolean

      The desired active state of the tool.

    Returns void