Hello,
I'm trying to display a very simple label using an arcade expression in a map in ArcGIS Online. In my map I have 3 points of interest and each point of interest has 3 average walk time distance buffers (polygons) from each POI. The labels work for one area of interest but not for the other and I'm using the same expression for each. All of the walk time polygons are stored in the same feature service.
if (IsEmpty($feature.distance)){
console ("no distance value")
}
else if (($feature.distance) == 200){
return "200m (approx. 2min. walk)"
}
else if (($feature.distance) == 400){
return "400m (approx. 5min. walk)"
}
else if (($feature.distance) == 600){
return "600m (approx. 10min. walk)"
}The labels display properly for the first POI:
The label only appears for the 200m buffer polygon for my other POI locations.
Any idea why this might be?
Solved! Go to Solution.
I figured out the issue. The features for the labels that show are clipped to the boundary of the distance value below (i.e. 400m buffer has a donut hole for the 200m buffer) while the other POI buffer polygons intersect each other. I used the clip tool to remove the overlaps and now the labels display.
Are you able to share the map and layer and I can help take a look. If you cant share it publicly you can pop it into a group and invite russell_jsapi into it.
Thanks
Russ
Have you checked the distance attribute for those other features? You'll only get returns if the values exactly match 200, 400, or 600.
I figured out the issue. The features for the labels that show are clipped to the boundary of the distance value below (i.e. 400m buffer has a donut hole for the 200m buffer) while the other POI buffer polygons intersect each other. I used the clip tool to remove the overlaps and now the labels display.