Select to view content in your preferred language

Arcade Popup from AGOL => Execution error - Cannot work with geometry in this spatial reference. It is different to the execution spatial reference

236
2
12-12-2024 06:25 AM
EmilAura
Emerging Contributor

Hi,

My colleague has created a layer with popups in AGOL. I receive the following error when using the layer in ArcGIS JS SDK 4.30.9.

Execution error - Cannot work with geometry in this spatial reference. It is different to the execution spatial reference
Encountered an error when evaluating the arcade expression 'Geometry($feature).z' (primitive: 'label-override', property: 'textString'). The map is in EPSG:3857 and so is the layer.


What am I doing wrong?

Tags (3)
0 Kudos
2 Replies
KristianEkenes
Esri Regular Contributor

Do you mind returning `GetEnvironment()` from your expression to see what spatial reference is set to the Arcade context? I suggest returning the following in your popup as the popup context is different than the Arcade editor context:

Text(GetEnvironment().spatialreference)

KristianEkenes_1-1734039104492.png

Post the response you see in the popup...

0 Kudos
EmilAura
Emerging Contributor

Hi,

 

I've attached a screenshot with

Text(GetEnvironment().spatialreference)

 

I see that I wrote PopUp, while I meant to write labels in my previous message

image (2).png

0 Kudos