Introducing a new AppStudio sample: Arcade Expressions

607
0
07-08-2022 09:20 AM
TrevorFrame
Esri Contributor
1 0 607

Hello AppStudio Community! Thank you for taking the time to read about one of our newest sample apps “Arcade Expressions”. This sample demonstrates how AppStudio apps can utilize ArcGIS Arcade expressions to customize the look and feel of your ArcGIS maps inside of your AppStudio apps.  

For those of you who aren’t familiar with ArcGIS Arcade, Arcade is a portable, lightweight, and secure expression language ArcGIS users can use to create custom content for applications. You can perform mathematical calculations, modify text styles, and even evaluate logical statements. The most important aspect of Arcade is it is built to work with geospatial functions and capabilities. Additionally, these expressions can be interpreted in many of our different ArcGIS apps such as ArcGIS Pro, ArcGIS Online, Runtime APIs, and of course AppStudio apps. To get started with ArcGIS Arcade, check out this ArcGIS Developer documentation. 

So now that you understand what ArcGIS Arcade is and where it can be used, let’s dive into how it can be used in AppStudio.  

Feature Labels 

Feature labeling is the process of dynamically providing descriptive text for features on a map or scene which are derived from the feature’s attributes themselves. With Arcade expressions, you can give your labels extra styling based on certain logic. The new Arcade Expressions sample provides an example of this as seen below. In this sample, you can rotate through the label expressions to dynamically see the labels update on the map. By default, it starts without any expression used, then will display total populations or total populations per square mile. 

 

RPReplay_Final1655938080_MP4_AdobeExpress (1).gif

 

Popups 

A popup is a pane that displays an identified features’ field attributes. In ArcGIS Online, you can configure popups using Arcade expressions to display customized text with styling. The text can be derived directly from field values or can use logic and calculations to display custom strings. You can follow this ArcGIS Learn Lesson that demonstrates how to do this. Once this popup is configured, AppStudio can pull that web map containing the layer with the configured popup as HTML text which can then be displayed in a pane on your mobile app. The example below demonstrates an AppStudio app that displays a configured popup from the above mentioned learn lesson.  

ArcadePopup.jpeg

 

This new sample demonstrates just two ways Arcade expressions can be used in AppStudio apps. Some other areas Arcade expressions are used are geotrigger notifications and feature attribute display field manipulation. 

As you can see, Arcade expressions are a useful way for styling labels to help exaggerate features or display custom popups already created for web maps.  

About the Author
Product Engineer working with AppStudio to build cross platform mobile applications.