The visualization profile allows the map author to write an expression that evaluates to a value used to drive the visualization. This could be used for a visual variable such as size, or as a value in a class breaks renderer. When the feature is to be drawn, the script will be evaluated. It is expected that the script returns a value specific to the rendering property being calculated (e.g. A number for a class breaks visualization or text for a unique value visualization).
This profile was created for use in the following contexts:
- ArcGIS Pro
- ArcGIS Enterprise
- ArcGIS Online
- ArcGIS Maps SDKs for Native Apps
|$feature||Feature||The feature which is to be drawn on the map.|
|$view.scale||Number||Returns the scale of the map at the time the expression evaluates. Only supported in 2D MapViews.|
Calculates the predominant political party within each feature.
var republican = $feature.MP06025a_B; var democrat = $feature.MP06024a_B; var independent = $feature.MP06026a_B; var parties = [republican, democrat, independent]; return Decode( Max(parties), republican, 'republican', democrat, 'democrat', independent, 'independent', 'n/a' );