Select to view content in your preferred language

Arcade Labels from ArcPro to Online

214
1
Jump to solution
08-05-2025 09:48 AM
Labels (1)
TimothyE
New Contributor

Hey all, 

I am using this code below to format labels in ArcGIS Pro to label cities with their Traditional/Native names (bold and italicized) with Common names appearing below. Formatting looks great in ArcPro but sharing the layer to online the formatting gets displayed as text. Is there a way in ArcGIS Online to preserve the text formatting?

Working Aracde (in ArcPro):


var nativeName = $feature.Native_Name;
var englishName = $feature.NAME;

return TextFormatting.NewLine + "<BOL><ITA>" + nativeName + "</ITA></BOL>" + TextFormatting.NewLine + englishName;

Label (ArcPro): Traditional Name

                            Common Name

Label (AGOL): <BOL><ITA>Traditional Name </ITA></BOL>

                                                   Common Name

        

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

Unfortunately, you can't use formatting tags in Arcade for labels on AGOL. What you would have to do is create a separate label class for each type of name. In each label class use the Label style to set the font and Offset Y to provide the proper spacing

Snag_1260a4a.png

View solution in original post

1 Reply
KenBuja
MVP Esteemed Contributor

Unfortunately, you can't use formatting tags in Arcade for labels on AGOL. What you would have to do is create a separate label class for each type of name. In each label class use the Label style to set the font and Offset Y to provide the proper spacing

Snag_1260a4a.png