Package | com.esri.drs.utils |
Class | public class ReviewerMapServerHelper |
Inheritance | ReviewerMapServerHelper ![]() |
This class automatically generates symbols and colors based on the contents of your Reviewer workspace. Unique values in a DashboardResult are used to build UniqueValueRenderers. These renderers are applied through LayerDrawingOptions to the REVTABLEPOINT, REVTABLELINE, and REVTABLEPOLY layers in the ArcGIS Data Reviewer for Server Map Server.
Instances of this class keep a cache of the symbols and colors used to render the map so that if the extent of the features being drawn changes, the colors are kept consistent.
The colors are selected based on a predefined color palette that helps make each unique value distinguishable from each other. However, using more than 20 unique values is not recommended because the resulting rendered map will not be helpful for analysis. Colors are not randomly selected for Severity and LifecycleStatus fields. Instead, a predefined color scale is applied.
If you use a custom color map, the auto generated or predefined palettes are not used. The following rules apply if the color map doesn't contain enough values to represent all unique values in the DashboardResult:
See also
Property | Defined By | ||
---|---|---|---|
defaultColor : uint [write-only]
Sets the default color. | ReviewerMapServerHelper | ||
getLayerDrawingOptionsLastResult : Object
Object returned from the last call to the getLayerDrawingOptions function. | ReviewerMapServerHelper | ||
lineSymbol : SimpleLineSymbol [write-only]
Sets the symbol used to render the reviewer map server's REVTABLELINE layer. | ReviewerMapServerHelper | ||
pointSymbol : SimpleMarkerSymbol [write-only]
Sets the symbol used to render the reviewer map server's REVTABLEPOINT layer. | ReviewerMapServerHelper | ||
polySymbol : SimpleFillSymbol [write-only]
Sets the symbol used to render the reviewer map server's REVTABLEPOLY layer. | ReviewerMapServerHelper |
Method | Defined By | ||
---|---|---|---|
ReviewerMapServerHelper(drsSoeUrl:String, pointSymbol:SimpleMarkerSymbol = null, lineSymbol:SimpleLineSymbol = null, polySymbol:SimpleFillSymbol = null, defaultColor:Number)
Constructor
| ReviewerMapServerHelper | ||
getLayerDrawingOptions(dashboardResult:DashboardResult, colorMap:Object = null, useDefaultColorForMissingValues:Boolean = false, responder:IResponder = null):void
Creates LayerDrawingOptions for the reviewer map server's REVTABLEPOINT, REVTABLELINE, and REVTABLEPOLY layers. | ReviewerMapServerHelper | ||
getReviewerMapServerUrl():String
Extracts the MapServer url from the full ArcGIS Data Reviewer for Server SOE url. | ReviewerMapServerHelper |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when there is a problem accessing the Reviewer Map Server. | ReviewerMapServerHelper | |||
Dispatched when the after the getLayerDrawingOptions operation successfully completes. | ReviewerMapServerHelper |
defaultColor | property |
defaultColor:uint
[write-only] Sets the default color. Used when the system cannot determine a color to apply to a symbol.
public function set defaultColor(value:uint):void
getLayerDrawingOptionsLastResult | property |
getLayerDrawingOptionsLastResult:Object
Object returned from the last call to the getLayerDrawingOptions function. The object holds two properties:
This property can be used as the source for data binding.
public function get getLayerDrawingOptionsLastResult():Object
public function set getLayerDrawingOptionsLastResult(value:Object):void
See also
// Event result object example: { "layerDrawingOptionsArray": [pointLayerDrawingOptions, lineLayerDrawingOptions, polygonLayerDrawingOptions], "colorMap":{'roads':0xFFFFFF, 'trees':0x00FF00, ...} }
lineSymbol | property |
lineSymbol:SimpleLineSymbol
[write-only] Sets the symbol used to render the reviewer map server's REVTABLELINE layer. You can define the alpha, style and width properties. Color is determined by the DashboardResult and ColorMap parameters passed to the getLayerDrawingOptions function.
public function set lineSymbol(value:SimpleLineSymbol):void
See also
pointSymbol | property |
pointSymbol:SimpleMarkerSymbol
[write-only] Sets the symbol used to render the reviewer map server's REVTABLEPOINT layer. You can define the alpha, angle, outline, size, style, xoffset, and yoffset properties. Color is determined by the DashboardResult and ColorMap parameters passed to the getLayerDrawingOptions function.
public function set pointSymbol(value:SimpleMarkerSymbol):void
See also
polySymbol | property |
polySymbol:SimpleFillSymbol
[write-only] Sets the symbol used to render the reviewer map server's REVTABLEPOLY layer. You can define the alpha, style and outline properties. Color is determined by the DashboardResult and ColorMap parameters passed to the getLayerDrawingOptions function.
public function set polySymbol(value:SimpleFillSymbol):void
See also
ReviewerMapServerHelper | () | Constructor |
public function ReviewerMapServerHelper(drsSoeUrl:String, pointSymbol:SimpleMarkerSymbol = null, lineSymbol:SimpleLineSymbol = null, polySymbol:SimpleFillSymbol = null, defaultColor:Number)
Constructor
ParametersdrsSoeUrl:String — ArcGIS Data Reviewer for Server SOE (DataReviewerServer) URL.
| |
pointSymbol:SimpleMarkerSymbol (default = null ) — SimpleMarkerSymbol used to render reviewer point results. The default symbol style is STYLE_CIRCLE and size 7.
| |
lineSymbol:SimpleLineSymbol (default = null ) — SimpleLineSymbol used to render reviewer polyline results. The default symbol style is STYLE_SOLID, black, with an alpha of 1 and width of 4.
| |
polySymbol:SimpleFillSymbol (default = null ) — SimpleFillSymbol used to render reviewer polygon results. The default symbol style is STYLE_SOLID, black, with an alpha of 1.
| |
defaultColor:Number (default = NaN ) — Default color, specified as a Number greater than or equal to 0, used when the system cannot determine a color to apply to a symbol.
|
See also
getLayerDrawingOptions | () | method |
public function getLayerDrawingOptions(dashboardResult:DashboardResult, colorMap:Object = null, useDefaultColorForMissingValues:Boolean = false, responder:IResponder = null):void
Creates LayerDrawingOptions for the reviewer map server's REVTABLEPOINT, REVTABLELINE, and REVTABLEPOLY layers.
Parameters
dashboardResult:DashboardResult — Obtained from a query to Data Reviewer Server using the DashboardTask.getDashboardResult function.
| |
colorMap:Object (default = null ) — Optional custom color map object that contains key-value pairs. Keys are the unique values in dashboardResult. Values are unsigned integers representing a color. Severity example: FeatureObjectClass Example: | |
useDefaultColorForMissingValues:Boolean (default = false ) — If false, colors for any values missing from the colorMap are generated from the color palette. If true, current defaultColor is assigned to all values missing from the colorMap.
| |
responder:IResponder (default = null ) — Handles the getLayerDrawingOptionsComplete event. Event result contains an array of LayerDrawingOptions.
|
See also
getReviewerMapServerUrl | () | method |
public function getReviewerMapServerUrl():String
Extracts the MapServer url from the full ArcGIS Data Reviewer for Server SOE url.
ReturnsString |
fault | Event |
mx.rpc.events.FaultEvent
Dispatched when there is a problem accessing the Reviewer Map Server.
getLayerDrawingOptionsComplete | Event |
com.esri.drs.DataReviewerTaskEvent
com.esri.drs.DataReviewerTaskEvent.GET_LAYER_DRAWING_OPTIONS_COMPLETE
Dispatched when the after the getLayerDrawingOptions operation successfully completes.
The event result object contains two properties: