Select to view content in your preferred language

Arcade Label Expression

81
3
Jump to solution
yesterday
SarahRijneke
Frequent Contributor

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:

SarahRijneke_3-1765305522207.png

The label only appears for the 200m buffer polygon for my other POI locations.

SarahRijneke_2-1765305487869.png

Any idea why this might be?

0 Kudos
1 Solution

Accepted Solutions
SarahRijneke
Frequent Contributor

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.

SarahRijneke_0-1765307616259.pngSarahRijneke_1-1765307648296.png

 

View solution in original post

3 Replies
RussRoberts
Esri Notable Contributor

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 

0 Kudos
KenBuja
MVP Esteemed Contributor

Have you checked the distance attribute for those other features? You'll only get returns if the values exactly match 200, 400, or 600.

0 Kudos
SarahRijneke
Frequent Contributor

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.

SarahRijneke_0-1765307616259.pngSarahRijneke_1-1765307648296.png