Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: ExtensionBase

require(["esri/opsdashboard/ExtensionBase"], function(ExtensionBase) { /* code goes here */ });

Description

(Added at v3.14)
(Currently in Mature Support) ExtensionBase is a base class used by all the extension proxies. It's not intended to be used by extension developers.

Samples

Search for samples that use this class.

Subclasses

Constants

NameDescription
CIRCLE"circle"
EXTENT"extent"
FREEHAND_POLYGON"freehandpolygon"
FREEHAND_POLYLINE"freehandpolyline"
LINE"line"
POINT"point"
POLYGON"polygon"
POLYLINE"polyline"

Properties

NameTypeSummary
isNativeBooleanRead-only: Indicates if the host application is the Windows Operations Dashboard.
portalHelperServicesObjectRead-only: It will list all of the Portal helper services.
portalUrlStringRead-only: The URL to the ArcGIS.com site or in-house portal that you are currently signed in to.

Methods

NameReturn typeSummary
getDataSourceProxies()PromiseGet the collection of data sources from the host application.
getDataSourceProxy(dataSourceId)PromiseGet the data source corresponding to the data source id from the host application.
getMapWidgetProxies()PromiseGet the collection of map widgets from the host application.
getMapWidgetProxy(mapWidgetId)PromiseGet the map widget corresponding to the map widget id from the host application.
hostInitializationError(err)NoneCalled when an error occurred during the initialization process with the host application.
hostReady()NoneCalled by the host application when the relationship has been established with the extension.
mapWidgetAdded(mapWidgetProxy)NoneCalled by the host application when a map widget has been added to the current view.
mapWidgetRemoved(mapWidgetId)NoneCalled by the host application when a map widget has been removed from the current view.

Events

[ On Style Events | Connect Style Event ]
All On Style event listeners receive a single event object. Additionally, the event object also contains a 'target' property whose value is the object which fired the event.

Events

NameEvent ObjectSummary
data-source-added
{
  dataSourceProxy: <Object>
}
Event indicating that a new data source has been added into the host operation view.
data-source-removed
{
  dataSourceId: <String>
}
Event indicating that a data source has been removed from the host operation view.
host-readyEvent indicating that the initialization process was successful.
initialization-error
{
  error: <Error>
}
Event indicating that the initialization process encountered an error.
map-widget-added
{
  mapWidgetProxy: <MapWidgetProxy>
}
Event indicating that a new map widget has been added into the host operation view.
map-widget-removed
{
  mapWidgetId: <String>
}
Event indicating that a map widget has been removed from the host operation view.
Property Details

<Boolean> isNative

Read-only: Indicates if the host application is the Windows Operations Dashboard. If false, the host application is the browser based Operations Dashboard.

<Object> portalHelperServices

Read-only: It will list all of the Portal helper services. (Added at v3.16)

<String> portalUrl

Read-only: The URL to the ArcGIS.com site or in-house portal that you are currently signed in to. (Added at v3.15)
Method Details

getDataSourceProxies()

Get the collection of data sources from the host application. Note: The promise this function returns will fail if the extension manifest do not have a property "useDataFromView" set to true. Deprecated at v3.18
Return type: Promise

getDataSourceProxy(dataSourceId)

Get the data source corresponding to the data source id from the host application. Note: The promise this function returns will fail if the extension manifest do not have a property "useDataFromView" set to true.
Return type: Promise
Parameters:
<String> dataSourceId Required The data source id

getMapWidgetProxies()

Get the collection of map widgets from the host application.
Return type: Promise

getMapWidgetProxy(mapWidgetId)

Get the map widget corresponding to the map widget id from the host application.
Return type: Promise
Parameters:
<String> mapWidgetId Required A map widget id

hostInitializationError(err)

Called when an error occurred during the initialization process with the host application.
Parameters:
<Error> err Required The error that occurred.

hostReady()

Called by the host application when the relationship has been established with the extension. All the configuration properties will be available and the extension functions will be usable when this function has been invoked.

mapWidgetAdded(mapWidgetProxy)

Called by the host application when a map widget has been added to the current view. It could occur when a publisher is adding a map widget when configuring the operation view.
Parameters:
<MapWidgetProxy> mapWidgetProxy Required A map widget id.

mapWidgetRemoved(mapWidgetId)

Called by the host application when a map widget has been removed from the current view. It could occur when a publisher is removing a map widget when configuring the operation view.
Parameters:
<String> mapWidgetId Required A map widget id.
Event Details
[ On Style Events | Connect Style Event ]

data-source-added

Event indicating that a new data source has been added into the host operation view.
Event Object Properties:
<Object> dataSourceProxy The new data source that has been added in the host operation view.

data-source-removed

Event indicating that a data source has been removed from the host operation view.
Event Object Properties:
<String> dataSourceId None

host-ready

Event indicating that the initialization process was successful. The configuration properties are available, the proxy functions are available, and the proxy events will be fired.

initialization-error

Event indicating that the initialization process encountered an error.
Event Object Properties:
<Error> error None

map-widget-added

Event indicating that a new map widget has been added into the host operation view.
Event Object Properties:
<MapWidgetProxy> mapWidgetProxy The new map widget that has been added in the host operation view.

map-widget-removed

Event indicating that a map widget has been removed from the host operation view.
Event Object Properties:
<String> mapWidgetId None
Show Modal