Arcade Pop Up Expression for Displaying Z value returns Execution error - Cannot work with geometry in this spatial reference.

536
2
Jump to solution
02-20-2024 02:38 PM
Labels (2)
BTW
by
New Contributor

I'm trying to display the Z value (Z is enabled for the feature) in my pop up in ArcGIS Enterprise 11.1 mapviewer. I used this article:

https://support.esri.com/en-us/knowledge-base/problem-z-values-do-not-display-in-pop-ups-when-using-...

When I use the expression in the article 

Geometry($feature).z

and run it I get the error

Execution error - Cannot work with geometry in this spatial reference. It is different to the execution spatial reference 

My map projection is in NZTM (2193) and the data is in the same projection. I saw on another community form that "the spatial reference of the geometry must match the spatial reference of the map where the Arcade is executed" @KristianEkenes .

When trying to display x and y in the pop up, I get the same execution error.

Is this a bug or is there something else I can do to display z values on the fly?

Thanks.

 

Tags (3)
1 Solution

Accepted Solutions
KristianEkenes
Esri Regular Contributor

It's possibly a bug in the Enterprise map viewer. Is the error showing up in the Arcade editor where you're authoring the expression? If so, I'd log a bug with support so they can get that fixed. The execution context for the editor must have a matching spatial reference as well as the map.

If you're copying and pasting into the playground of the online documentation, then you will definitely see that error as the spatial reference there is web mercator.

View solution in original post

2 Replies
KristianEkenes
Esri Regular Contributor

It's possibly a bug in the Enterprise map viewer. Is the error showing up in the Arcade editor where you're authoring the expression? If so, I'd log a bug with support so they can get that fixed. The execution context for the editor must have a matching spatial reference as well as the map.

If you're copying and pasting into the playground of the online documentation, then you will definitely see that error as the spatial reference there is web mercator.

BTW
by
New Contributor

Thanks for the quick reply Kristian. I tried it in ArcGIS Online with the same set up and it works fine. It's a bug in Enterprise map viewer. 

0 Kudos