arcade: an introduction - esri...arcade: an introduction author esri subject 2019 esri user...

23
Arcade: An Introduction Allison Rost Jack Horton

Upload: others

Post on 20-Jun-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

Arcade: An IntroductionAllison RostJack Horton

Page 2: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

Arcade is a portable, lightweight, and secureexpression language for the ArcGIS Platform.

• Evaluate mathematical equations

• Manipulate text

• Evaluate logical statements

• Query and manipulate geometries

• Alter symbology, transparency, rotation, etc

• Establish rules for attributes

• Format contents of popups

Page 3: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

An interoperable expression syntax for

• ArcGIS Pro

• ArcGIS Runtime

• ArcGIS Online and ArcGIS Enterprise

• ArcGIS API for JavaScript

• Attribute Rules in the geodatabase- Automatic calculation of fields- Constraints and validation

Page 4: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

What Arcade is not

- Not a replacement for Python- Not a stand-alone scripting environment

Arcade expressions run inside ArcGIS apps

… For example, a label expression in ArcGIS Pro

Page 5: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri
Page 6: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri
Page 7: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

$feature.CLAIMNAME + TextFormatting.NewLine + round(number($feature.Shape_Area / 43560),0) + “Acres”"

Page 8: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

$feature.CLAIMNAME + TextFormatting.NewLine + round(number($feature.Shape_Area / 43560),0) + “Acres”"

Page 9: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

$feature.CLAIMNAME + TextFormatting.NewLine + round(number($feature.Shape_Area / 43560),0) + “Acres”"

Page 10: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

$feature.CLAIMNAME + TextFormatting.NewLine + round(number($feature.Shape_Area / 43560),0) + “Acres”"

Page 11: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

$feature.CLAIMNAME + TextFormatting.NewLine + round(number($feature.Shape_Area / 43560),0) + "Acres”"

Page 12: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

$feature.CLAIMNAME + TextFormatting.NewLine + round(number($feature.Shape_Area / 43560),0) + "Acres”"

Page 13: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

$feature.CLAIMNAME + TextFormatting.NewLine + round(number($feature.Shape_Area / 43560),0) + "Acres”"

Page 14: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

$feature.CLAIMNAME + TextFormatting.NewLine + round(number($feature.Shape_Area / 43560),0) + "Acres”"

Page 15: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

$feature.CLAIMNAME + TextFormatting.NewLine + round(number($feature.Shape_Area / 43560),0) + “Acres”"

Page 16: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

$feature.CLAIMNAME + TextFormatting.NewLine + round(number($feature.Shape_Area / 43560),0) + "Acres”"

Page 17: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

$feature.CLAIMNAME + TextFormatting. NewLine + round(number(Area($feature) / 43560),0) + "Acres”"

Page 18: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

$feature.CLAIMNAME + TextFormatting.NewLine + round(number(Area($feature, "ACRES")),0) + " Acres"

Page 19: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri
Page 20: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

Labeling is a Profile in Arcade

A context in which an Arcade expression is evaluated and understood

- A label expression is understood and evaluated in multiple applications- Here is the same Arcade label expression in the ArcGIS API for JavaScript

var claimLabels = $feature.CLAIMNAME + TextFormatting.NewLine + round(number(Area($feature, "ACRES")),0) + “ Acres“;

const labelClass = new LabelClass({ labelExpressionInfo: {expression: claimLabels},symbol: {type: "text", color: "black", haloSize: 1, haloColor: "white"}

});featureLayer.labelingInfo = [ labelClass ]

Page 21: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

Here are the profiles that are currently supportedWe will show you examples of some of them

• Labeling• Field Calculate• Visualization• Popups• Alias • Attribute Rules• Constraint• Feature Z

Page 22: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

Here are the profiles that are currently supportedWe will show you examples of some of them

• Labeling• Field Calculate• Visualization• Popups• Alias • Attribute Rules• Constraint• Feature Z

Page 23: Arcade: An Introduction - Esri...Arcade: An Introduction Author Esri Subject 2019 Esri User Conference -- Presentation Keywords 2019 Esri User Conference -- Presentation, 2019 Esri

How to get started

• On ArcGIS for Developers: https://developers.arcgis.com/arcade/- Includes a language playground for experimenting with the language