I wrote some arcade to format a web map pop up and it works OK when I click the Test button but not when it gets called from a pop up. The code is trying to retrieve the x,y coordinates of the feature centroid. In the example below I've boiled it down to show that line 2 is causing the problem. When commented out, arcade returns the expected output. When left as-is, the popup shows nothing and reports no error. Any ideas>
var center = Centroid($feature)
center.x // When I comment this out it "works"
return {
type : 'text',
text : 'Works'
}
Solved! Go to Solution.
I tried this again this morning and now it works as expected. Very strange.
I tried this again this morning and now it works as expected. Very strange.