Skip To Content

App

App is the main class that instantiates the application. It defines the mapping application and exposes map functionality. Storage provides an interface for storing and retrieving information for the application.

App and Storage object model diagrams

App

Properties

NameTypeSummary

map

esri/Map

Returns the instance of the Map in the App.

popup

esri/dijit/Popup

The Popup.

portal

esri/arcgis/Portal

An instance of a ArcGIS Enterprise object.

selectedLayer

esri/layers/Layer

The currently selected layer in the Contents pane.

storage

Object

Provides functions to store and retrieve information.

Methods

NameReturn TypeSummary

showMessage(title, message, confirm)

Nothing

Used to display a message.

Method details:

· title

Title text displayed at the top of the message.

· message

Message text to display under the title.

· confirm

Boolean value indicating if the message has an OK button when confirm = false or Yes and No buttons when confirm = true.

showWidget(widget, options)

Dialog

Used to show a widget.

Method details:

· widget

The dojo widget to display.

· options

Options to display. JSON format indicating the title of the widget container, subtitle of the widget container, and whether the widget is modal or non-modal. By default, the widget will be nonmodal (showModal = false).

Events

On EventEvent PropertiesDescription

selected-layer-change

esri/layers/Layer

Fires when the selected layer changes.

started

Fires when the app loading sequence has completed and the App has started.

Storage

Methods

NameReturn TypeSummary

get(key, scope)

Any

Returns the value associated with the specified key. If scope is specified, then the key-value map will only be retrieved from the respective storage; otherwise, this function will check all storage methods.

Method details:

· key

The key to use to retrieve the value.

· scope

The scope of the value to retrieve.

remove(key, scope)

Nothing

Removes the key-value pairs associated with the specific key from storage.

Method details:

· key

The key to be removed from storage.

· scope

The scope of the value to be removed.

set(key, value, scope)

Nothing

Stores a key-value map. If scope is specified, then the key-value map will be stored with the respective storage method.

Method details:

· key

A key with which to store the value.

· value

The value to store.

· scope

The scope of the value to be set.


In this topic
  1. App
  2. Storage