I am using the arcade expression builder in enterprise 10.8.1 web map. I am trying to select the intersection of two polygons, using the centroid of one. However, the arcade function "Centroid" does not give me a parameter to specify that I only want the point placed inside the poly, so it is giving me false results. Here is my code so far:
var citylimits = FeatureSetByName($map,"City Limits")
var inter = intersects(centroid($feature) ,citylimits)
var cityname = ''
for (var i in inter){
cityname = i.CITY + ' City Limits'
}
if(cityname == ''){
cityname = ' '}
return cityname
Since the point is sometimes placed outside of the polygon, my result gives me false returns. Any tips here on using centroid in arcade?
Solved! Go to Solution.
I want a Label in a print layout to update based on the centroid of the maps intersection with a particular layer. Is that doable?