By default, the Rich text template is opened.Ī – Change the default name to something more meaningful and easier to recognize.ī – Edit and add comments to describe what the expression does and also use comments to document the steps along the way. When you open the Arcade editor, there are several templates that help you get started. While the Arcade behind both expressions and elements is very similar, Arcade content elements are self-contained, so anything you need must be done within the element. One of the biggest differences between Arcade attribute expressions and Arcade content elements is that attribute expressions are used in text elements, and Arcade content elements are intended to return a complete part of your pop-up, either independently or combined with other elements. Compare Peaks (Expressions) and Peaks (Content Element) to understand the two approaches. In this example the Arcade content element is similar to the pop-up created with attribute expressions above, with some additional HTML styling. You can follow along by viewing the sample map and opening the Sample Pop-ups layer group, then selecting and viewing the Peaks (Element) layer. Warnings also appear in the editor, helping you understand when there’s something in your expression that could be a problem or could be improved. The Arcade editor also includes Intellisense, helping to reduce errors and helping to complete the expression as you write it. Help links to the Arcade help documentation. Suggestions provide a list of existing expressions so that you can copy some or all of an expression into a new one. You can also create your own custom functions for use in expressions. Each function has built-in help so you can learn how to use them. For example, Round is a math function that rounds the input numerical value to the specified number of places, and returns the new rounded number. Functions are grouped and categorized into constants, data functions, feature functions, math functions, text functions, and so on. For example, $feature.name returns the content of the field “name” for the feature.įunctions are used to calculate values in expressions. This variable is used to retrieve specific attributes (fields) for the feature. For example, $feature references the feature you click on your map to open the pop-up. Profile variables are special global variables that can be used in expressions. On the Settings (light) toolbar, click Pop-ups, then Attribute expressions. To view the expressions, open the layers pane from the Contents (dark) toolbar and select the layer you want. You can follow along by viewing the sample map that has the layers and expressions covered in this blog article. Open the Arcade examples map to follow along. Use these links to jump to a section of interest. This is especially useful if you don’t own the source-Arcade can be applied to any feature layer in a map. If you have improperly formatted attributes, need to do a conversion, need to perform mathematical operations (e.g., sum values or calculate percentages), use logical expressions for branching, or perform geometric operations (e.g., calculate areas or intersections).Īrcade provides a straightforward, Excel-like way, to manipulate data without having to go back to the source. Pop-ups: the essentials provides an overview of pop-ups and how they can be configured.Īrcade enables you to work with data dynamically to perform calculations and manipulate data on-the-fly. Using Arcade expressions and elements, you can take your pop-ups to the next level. This blog article focuses only on the Popups profile and offers an overview of how it is used to craft layer pop-ups.Īrcade in pop-ups can be used in two ways to create attribute expressions used in text elements that can be evaluated like fields, or as separate Arcade content elements that return a complete block of content. Arcade exists within a profile, or context, that defines the parameters that are available to the script as global inputs and the output expected from the script. It can be used to perform calculations, manipulate text, and evaluate logical statements. Arcade can be thought of as a collection of useful tools that can be applied to craft the very best pop-ups, leveraging functions and logic to perform calculations and geometric operations, format text, access data from other layers, and much more.Īrcade is an expression language that is supported across ArcGIS. Pop-ups can transform an otherwise dull list of attributes into a far more meaningful display of intuitive and engaging information for your audience. Layer pop-ups are an important part of crafting the complete map information experience.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |