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

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

Description

(Added at v3.14)
(Currently in Mature Support) MapWidgetProxy is a proxy class that represents a operations dashboard map widget. Map widget instances cannot be directly instantiated. To get a particular data source, extension mixins functions getMapWidgetProxy or getMapWidgetProxies should be used.

Samples

Search for samples that use this class.

Properties

NameTypeSummary
idStringRead-only: The map id.
nameStringRead-only: The name of the map.
spatialReferenceSpatialReferenceRead-only: The spatial reference of the map.

Methods

NameReturn typeSummary
createGraphicsLayerProxy(options?)PromiseCreates a graphics layer in the host map.
destroyGraphicsLayerProxy(graphicsLayerProxy)NoneDestroys in the host map a host graphics layer.
getMapExtent()PromiseGets the current host map extent.
panTo(mapPoint)NonePans the map to a new location.
setExtent(extent)NoneSets an extent on the host map extent.
subscribeToMapEvents()NoneSubscribes to the host map events.
unsubscribeFromMapEvents()NoneUnsubscribes from the host map events.

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
map-extent-change
{
  extent: <Extent>
}
Event indicating that the host map extent has changed.
Property Details

<String> id

Read-only: The map id.

<String> name

Read-only: The name of the map.

<SpatialReference> spatialReference

Read-only: The spatial reference of the map.
Method Details

createGraphicsLayerProxy(options?)

Creates a graphics layer in the host map.
Return type: Promise
Parameters:
<Object> options Optional The options for the new graphics layer
Object Specifications:
<graphicsLayerOptions>
<Number> maxScale Required Maximum visible scale for the layer. If the map is zoomed in beyond this scale, the layer will not be visible. A value of 0 means the layer does not have a maximum visible scale.
<Number> minScale Required Minimum visible scale for the layer. If the map is zoomed out beyond this scale, the layer will not be visible. A value of 0 means the layer does not have a minimum visible scale.
<Number> opacity Required Opacity or transparency of layer. Values range from 0.0 to 1.0, where 0.0 is 100% transparent and 1.0 has no transparency.
<Renderer> renderer Required The renderer for the host graphics layer. Since the Windows operations dashboard is built using ArcGIS Runtime SDK for WPF only renderers supported by the WPF should be used, such as SimpleRenderer, UniqueValueRenderer and ClassBreaksRenderer.
<Boolean> visible Required Indicates if the graphics layer is visible or not.

destroyGraphicsLayerProxy(graphicsLayerProxy)

Destroys in the host map a host graphics layer.
Parameters:
<GraphicsLayerProxy> graphicsLayerProxy Required The host graphics layer to destroy.

getMapExtent()

Gets the current host map extent.
Return type: Promise

panTo(mapPoint)

Pans the map to a new location.
Parameters:
<Point> mapPoint Required A new location with the same spatial reference as the host map.

setExtent(extent)

Sets an extent on the host map extent.
Parameters:
<Extent> extent Required A new map extent.

subscribeToMapEvents()

Subscribes to the host map events. For optimization purpose host map events are not automatically sent to extension map widgets. Currently only map extent changed is supported.

unsubscribeFromMapEvents()

Unsubscribes from the host map events. For optimization purpose host map events are not automatically sent to extension map widgets. Currently only map extent changed is supported.
Event Details
[ On Style Events | Connect Style Event ]

map-extent-change

Event indicating that the host map extent has changed.
Event Object Properties:
<Extent> extent The new map extent.
Show Modal