HOW TO

Identify if Z-enabled points are added to the map or scene in the ArcGIS Online Map Viewer pop-up

Last Published: November 30, 2023

Summary

In ArcGIS Pro, data with z-values can be observed in a 3D object scene layer or a map. However, when this data is published to ArcGIS Online, the point scene layers are automatically thinned and the z-value is no longer available, making it difficult to identify whether the points are added to a scene or a map. This task can be simplified in the web map pop-up using an Arcade expression to identify the z-value. If the data returned has an absolute zero (0) value, the point is added to the map, whereas if the values have decimal numbers more or lower than the absolute zero (0), the point is added to a scene. This is because only data added to a flat surface on a map has an absolute zero (0) value. This article provides the steps to identify if Z-enabled points are added to the map or scene using Arcade in the ArcGIS Online Map Viewer pop-up.

Procedure

  1. Open the hosted feature layer or web map in ArcGIS Online Map Viewer.
  2. On the Contents (dark) toolbar, click Layers The Layers icon..
  3. In the Layers pane, click the point feature layer.
  4. On the Settings (light) toolbar, click Pop-ups The Pop-ups icon..
  5. In the Pop-ups pane, under Options, click Manage expressions>Add expression.
  6. In the dialog box, specify a name for the expression.
  7. In the Expression box, copy and paste the following expression:
var geom = Geometry($feature)
if (!IsEmpty(geom)) {
    return geom.z
} else {
    return null
}
The Z value Arcade expression configured in the Expression box.
  1. Click Run.
  2. When the Output tab displays the z-value, click Done.
The Z value displayed on the Output tab.
  1. Click Back The Back icon. next to Attribute expressions.
  2. In the Pop-ups pane, click Fields list > Select fields.
  3. In the Select fields pane, under Expressions, check the newly created expression field, and click Done.

The images below show the point features with a z-value in the pop-up in ArcGIS Online Map Viewer. The point feature with the z-value 0.37430 is added to the scene layer whereas the point feature with the z-value 0 is added to the map.

The Z value displayed in the pop-up.
The Z value displayed in the pop-up.

Article ID: 000031548

Software:
  • ArcGIS Online

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options