ArcGIS Pro Arcade Examples

By Katherine

Discover the power and versatility of ArcGIS Pro with its Arcade spatial analytics and visualization capabilities. Arcade, a JavaScript-based expression language, allows you to perform calculations, make decisions, and create dynamic content within your maps. Let's delve into some practical ArcGIS Pro Arcade examples to sharpen your skills and unlock your map's full potential.

the side panel with layout and measurements
the side panel with layout and measurements

Before exploring examples, remember that Arcade evaluates expressions using current map extent, data source, and symbology. This ensures that your map displays relevant, up-to-date information based on the user's interaction.

ArcGIS Urban 101 – Projects and Plans
ArcGIS Urban 101 – Projects and Plans

Calculating Values with Arcade

Arcade enables you to perform diverse calculations, enhancing your map's functionality. Here are a couple of examples:

Tutorial: Get started with arcpy.mp | ArcGIS Pro documentation
Tutorial: Get started with arcpy.mp | ArcGIS Pro documentation

Finding the length of a polyline

Using the $length expression, you can determine the length of a polyline feature. This is particularly useful when you want to display the length alongside the feature:

the floor plan for an office building with two separate areas, and three different sections to each
the floor plan for an office building with two separate areas, and three different sections to each

```arcade $length ```

To apply this to your map, you can create a text label using Arcade with the following expression:

```arcade "${Length: 3} meters" ```

Calculating area of a polygon

Similar to $length, you can find the $area of a polygon feature to display its size:

Arcade
Arcade

```arcade $area ```

When using this expression, don't forget to specify units in the label's text property:

```arcade "${Area: 3} square kilometers" ```

Making Decisions with Arcade

Arcade allows you to make decisions based on data attributes, enabling you to create dynamic symbology and labels. Here are some examples:

ARC P2
ARC P2

Using Switch Case

The switchouses function lets you create decision trees using a case structure. This allows for multi-part symbology out of single-part attribute values:

an illustrated map of the apexx city
an illustrated map of the apexx city
an image of a computer screen with measurements
an image of a computer screen with measurements
an old fashioned arcade machine with the measurements
an old fashioned arcade machine with the measurements
an old computer game with hearts and numbers on the screen, which reads score ranking
an old computer game with hearts and numbers on the screen, which reads score ranking
Streamline Planning and Community Development
Streamline Planning and Community Development
Pixel Art Arcade Square description
Pixel Art Arcade Square description
The Internet Arcade, A Large Collection of Coin-Operated Arcade Games Playable in a Web Browser
The Internet Arcade, A Large Collection of Coin-Operated Arcade Games Playable in a Web Browser
THE ARCADE MANIA THE ULTIMATE COMBO ARCADE FOR RETRO GAMER
THE ARCADE MANIA THE ULTIMATE COMBO ARCADE FOR RETRO GAMER
Continuous Arcade Learning Environment (CALE): Advancing the Capabilities of Arcade Learning Environment
Continuous Arcade Learning Environment (CALE): Advancing the Capabilities of Arcade Learning Environment
BIG's Website is Now a Playable Classic Arcade Game
BIG's Website is Now a Playable Classic Arcade Game

```arcade switchouses( 'value', "Case1" : color.red, "Case2" : color.green, else : color.blue ) ```

Utilizing If ElseIf statements

You can also create conditional statements using the familiar if-elseif construct to specify behavior based on attribute values:

```arcade if (${Year} > 2000, 'New', if (${Year} > 1950, 'Mid-20th Century', 'Old')) ```

This expression categorizes features based on their 'Year' attribute, displaying 'New', 'Mid-20th Century', or 'Old' in the label text.

Dynamic Content with Arcade

Arcade enables you to generate dynamic content based on feature attributes and location. Let's see an example:

Labeling the closest ferry stop

Using the Arcade nearestFeature function, you can label a point feature with the name of the nearest ferry stop:

```arcade nearestFeature( "FerryStops", 'id', 'name', 1000 ) ```

This expression returns the 'name' attribute from the closest 'FerryStop' feature within a 1000-meter radius. The distance value can be adjusted as needed.

Mastering Arcade expressions empowers you to create sophisticated, engaging maps in ArcGIS Pro. Experiment with these examples and discover new ways to enhance your mapping workflow. Now that you've explored theycin, you're ready to put Arcade to work and elevate your spatial analytics and visualization skills.