Unlocking Classic Arcade Expression in ArcGIS Online

By Katherine

step into the world of geospatial storytelling with Arcade, a powerful expression language integrated into ArcGIS Online. This innovative tool allows you to create engaging, interactive maps and apps that reveal insights like never before. Let's explore how Arcade can supercharge your GIS experience and unlock the full potential of your data.

Arcade
Arcade

Arcade enables you to perform calculations, make decisions, and filter data directly in your web maps and apps. Whether you're a seasoned GIS professional or a newcomer to the field, Arcade empowers you to create dynamic maps that adapt to user interactions and reveal complex information with ease.

a video game store with arcade machines and games
a video game store with arcade machines and games

Arcade Basics: syntax & structure

Before diving into Arcade's capabilities, let's familiarize ourselves with its basic syntax and structure. Arcade is an interpreted language, meaning it processes statements line by line. It uses a simple, python-like syntax that makes it easy to learn and use.

Arcade
Arcade

Here are some key elements of Arcade's syntax:

  • Variables: Store values and data, such as features, coordinates, or numeric expressions.
  • Functions: Execute specific tasks and return values, such as calculating area, comparing values, or filtering data.
  • Control Structures: Make decisions, loop through features, or repeat operations based on conditions and criteria.
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

Variables & Data Types

Variables in Arcade are created and assigned values using the following syntax:

$myVariable = value;

Arcade supports several data types, including numbers, strings, geometries, and arrays:

Your daily dose of brainrot just got pixelated and put in an arcade 🕹️✨Wanna play?
Your daily dose of brainrot just got pixelated and put in an arcade 🕹️✨Wanna play?

Numerics: $distance = 10; (integers) and $price = 12.99; (floating-point)

Strings: $name = "Central Park";

Geometries: $location = $feature.shape;

Continuous Arcade Learning Environment (CALE): Advancing the Capabilities of Arcade Learning Environment
Continuous Arcade Learning Environment (CALE): Advancing the Capabilities of Arcade Learning Environment

Arrays: $coordinates = [40.7128, -74.0060];

Functions: Building Blocks of Arcade

edward 😕😕
edward 😕😕
MakeCode Arcade Convert a picture into a sprite or background; Pedersen
MakeCode Arcade Convert a picture into a sprite or background; Pedersen
some red and black paper with different designs on it, including the letter snk
some red and black paper with different designs on it, including the letter snk
four different images of mario and luigi's shoes with the names of their characters
four different images of mario and luigi's shoes with the names of their characters
Great News! MakeCode Arcade Makey Makey Extension and Kayak Simulator
Great News! MakeCode Arcade Makey Makey Extension and Kayak Simulator
the frogger arcade machine is ready to play
the frogger arcade machine is ready to play
an old school video game with a person on a motorcycle
an old school video game with a person on a motorcycle
the back to the future poster with an image of a rocket ship and other objects
the back to the future poster with an image of a rocket ship and other objects
several arcade machines in a brightly lit room
several arcade machines in a brightly lit room
🚀 Sega’s Space Harrier – The Arcade Game That Blew Minds in the 80s
🚀 Sega’s Space Harrier – The Arcade Game That Blew Minds in the 80s

Functions in Arcade perform specific tasks and return values. They can be predefined (built-in) or user-defined. Predefined functions include:

  • to diede(): Converts numbers to a string with a specified number of decimal places.
  • distance(geometry1, geometry2): Calculates the distance between two geometries.
  • geometryIntersects(geometry1, geometry2): Checks if two geometries intersect.

Arcade in Action: Creating Dynamic Maps

Now that we've covered the fundamentals of Arcade, let's explore how to use it to create dynamic, interactive maps. By integrating Arcade expressions into your web maps and apps, you can reveal hidden insights, optimize user experience, and make data-driven decisions with ease.

Here are some practical use cases and examples of Arcade in action:

Conditional Rendering & Symbolization

Use Arcade to apply conditional rendering and symbolization to your maps, allowing features to change their appearance based on specific criteria. For example, you can display parks as green shapes if they are within city limits and as gray shapes if they are outside the city:

$color = (geometryIntersects($map extent, $feature.shape)) ? "green" : "gray";

Labeling Features with Arcade Expressions

Enhance your maps by adding labels to features using Arcade expressions. You can display attribute values, calculations, or even combine data from multiple attributes to create meaningful labels:

$label = $feature.Area + " acres";

Or display the number of nearby features:

$label = count(featuresNear($feature, "neighborhood", "within", 2000));

Filtering Features Based on User Input

Create interactive maps that allow users to filter features based on their input. By using Arcade expressions with pop-ups and interactive legends, you can engage users and help them explore your data more effectively:

By integrating Arcade into ArcGIS Online, you open the door to a world of geospatial storytelling and dynamic mapping. Whether you're a seasoned GIS professional or just starting out, Arcade equips you with the tools needed to create engaging, interactive maps that reveal insights and drive informed decision-making.

Embrace the power of Arcade and unleash the full potential of your data today! Explore the endless possibilities of ArcGIS Online and start creating stunning, interactive maps that tell a story and inspire action.