Packagecom.esri.drs.utils
Classpublic class ReviewerMapServerHelper
InheritanceReviewerMapServerHelper Inheritance flash.events.EventDispatcher

Generates dynamic rendering options (see esri.ags.layers.supportClasses.LayerDrawingOptions class) for Reviewer workspace results.

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

com.esri.drs.DashboardResult
http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/renderers/UniqueValueRenderer.html
http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/layers/supportClasses/LayerDrawingOptions.html


Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
  
Extracts the MapServer url from the full ArcGIS Data Reviewer for Server SOE url.
ReviewerMapServerHelper
Events
 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
Property Detail
defaultColorproperty
defaultColor:uint  [write-only]

Sets the default color. Used when the system cannot determine a color to apply to a symbol.


Implementation
    public function set defaultColor(value:uint):void
getLayerDrawingOptionsLastResultproperty 
getLayerDrawingOptionsLastResult:Object

Object returned from the last call to the getLayerDrawingOptions function. The object holds two properties:

  1. layerDrawingOptionsArray - an array of LayerDrawingOptions, for point, line and polygon layers.
  2. colorMap - a collection of keys (unique field values) and color values

This property can be used as the source for data binding.


Implementation
    public function get getLayerDrawingOptionsLastResult():Object
    public function set getLayerDrawingOptionsLastResult(value:Object):void

See also


Example
         // Event result object example:
         {
             "layerDrawingOptionsArray": [pointLayerDrawingOptions, lineLayerDrawingOptions, polygonLayerDrawingOptions],
             "colorMap":{'roads':0xFFFFFF, 'trees':0x00FF00, ...}
         }
         
lineSymbolproperty 
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.


Implementation
    public function set lineSymbol(value:SimpleLineSymbol):void

See also

pointSymbolproperty 
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.


Implementation
    public function set pointSymbol(value:SimpleMarkerSymbol):void

See also

polySymbolproperty 
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.


Implementation
    public function set polySymbol(value:SimpleFillSymbol):void

See also

Constructor Detail
ReviewerMapServerHelper()Constructor
public function ReviewerMapServerHelper(drsSoeUrl:String, pointSymbol:SimpleMarkerSymbol = null, lineSymbol:SimpleLineSymbol = null, polySymbol:SimpleFillSymbol = null, defaultColor:Number)

Constructor

Parameters
drsSoeUrl: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

Method Detail
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: var colorMap:Object = { 1: 0x800080, 2: 0xFF00FF, 3: 0x993366, 4: 0xCC99FF, 5: 0x008080 };

FeatureObjectClass Example: var colorMap:Object = { "Roads": 0x800000, "Buildings": 0x008000 };

 
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.

Returns
String
Event Detail
fault Event
Event Object Type: mx.rpc.events.FaultEvent

Dispatched when there is a problem accessing the Reviewer Map Server.

getLayerDrawingOptionsComplete Event  
Event Object Type: com.esri.drs.DataReviewerTaskEvent
DataReviewerTaskEvent.type property = 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:

  1. layerDrawingOptionsArray - an array of LayerDrawingOptions, for point, line and polygon layers.
  2. colorMap - a collection of keys (unique field values) and color values