require(["esri/opsdashboard/GraphicsLayerProxy"], function(GraphicsLayerProxy) { /* code goes here */ });
Description
(Added at v3.14)
(Currently in Mature Support) GraphicsLayerProxy is a proxy class that represents a graphics layer in a map widget in the host application. GraphicsLayerProxy cannot be directly instantiated. To create a graphics layer proxy, use the function createGraphicsLayerProxy. When the GraphicsLayerProxy is no longer required, it should be destroyed using destroyGraphicsLayerProxy.
Samples
Search for
samples that use this class.
Properties
maxScale | Number | Read-only: The current host graphics layer maximum visible scale. |
minScale | Number | Read-only: The current host graphics layer minimum visible scale. |
opacity | Number | Read-only: The current host graphics layer opacity ratio. |
renderer | Renderer | Read-only: The current renderer used by the host graphics layer. |
visible | Boolean | Read-only: The current host graphics layer visibility. |
Methods
Property Details
Read-only: The current host graphics layer maximum visible scale. 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 scale. Use
setMaxScale() to change this value.
Read-only: The current host graphics layer minimum visible scale. 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 visible scale. Use
setMinScale() to change this value.
Read-only: The current host graphics layer opacity ratio. Values range from 0.0 to 1.0, where 0.0 is 100% transparent and 1.0 has no transparency. Use
setOpacity() to change this value.
Read-only: The current renderer used by the host graphics layer. Use
setRenderer() to change this value and all its properties.
Read-only: The current host graphics layer visibility. Use
setVisibility() to change this value.
Method Details
Update a graphic in the host graphics layer with a new version. If the graphic doesn't exist then add it.
Parameters:
<Graphic > graphic |
Required |
The graphic to update in the host graphics layer. |
Update graphics in the host graphics layer with a new version. If the graphics don't exist then add them.
Parameters:
<Graphic[] > graphics |
Required |
The graphics to update in the host graphics layer. |
Removes all the graphics from the host graphics layer.
Removes from the host graphics layer a graphic.
Parameters:
<Graphic > graphic |
Required |
The graphic to remove from the host graphics layer. |
Sets the host graphics layer maximum scale.
Parameters:
<Number > maxScale |
Required |
None |
Sets the host graphics layer minimum scale.
Parameters:
<Number > minScale |
Required |
None |
Sets the host graphics layer opacity ratio. Values range from 0.0 to 1.0, where 0.0 is 100% transparent and 1.0 has no transparency.
Parameters:
<Number > opacity |
Required |
An opacity ratio between 0 and 1. |
Sets the host graphics layer renderer. Using a renderer for a graphics layer is a good optimization when dealing with a lot of graphics having a same set of symbols. It prevents having the same symbol duplicated in each graphics.
Parameters:
<Renderer > renderer |
Required |
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. |
Set the visibility of the host graphics layer.
Parameters:
<Boolean > visibility |
Required |
The new visibility value. |