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:
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.
Solved! Go to Solution.
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.
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.
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.