I've been designing some maps in ArcGIS Pro for printing (with the hope of creating identical web map versions) and, seeing that Arcade expressions can carry over into ArcGIS Online, went through the time and effort to figure out and incorporate arcade expressions into my labels. I then shared my layers to my ArcGIS Online account and found that (among many other things) my Arcade label expressions were not recognized or supported.
Wasn't the whole point of Arcade to have a universal expression language across the platform and make sharing content between different applications quick and seamless? Below are some screenshots of what it should look like vs what came up in ArcGIS Online, as well as the expression I am using.
If this is a limitation of ArcGIS Online? If so, can we get some documentation on what is and isn't supported? The only thing I saw in my prior research was that multi-line label expressions were not supported, and it's frustrating to have to find the limitations yourself through trial and error. I'm glad we're getting progress in the web map labeling department, but I thought universal meant universal.
Arcade Label expression:
"<FNT size = '12'>" + Replace($feature.fsp_labels_SITE_NAME, 'State Park', 'SP') + "</FNT>" + " " + "<FNT size = '25'>" + $feature.fsp_labels_NUM + "</FNT>"
What I'm trying to do is replace some words with abbreviations and then use two different font sizes. The replace function worked, so I'm guessing it's just an issue of using two font sizes in one label? There really needs to be some better documentation on this stuff for users to refer to. #
Solved! Go to Solution.
The label options in ArcGIS Online are still very limited. There is no support for using fnt, clr and other tags (yet?). As you noticed, when you create some "html" string format it will not be interpret the html, it will just parse it as text. In the future you will see that the possibilities will start to be more similar to allow you to do what you want. This will take some time though.
The closest you can get at this moment is using two copies of the layer and use different alignments and sizes for the name and the value:
for the name and for the value for instance.
The result will be something like:
Not the same, however closer than this is difficult to achieve in the current version (without programming).
The label options in ArcGIS Online are still very limited. There is no support for using fnt, clr and other tags (yet?). As you noticed, when you create some "html" string format it will not be interpret the html, it will just parse it as text. In the future you will see that the possibilities will start to be more similar to allow you to do what you want. This will take some time though.
The closest you can get at this moment is using two copies of the layer and use different alignments and sizes for the name and the value:
for the name and for the value for instance.
The result will be something like:
Not the same, however closer than this is difficult to achieve in the current version (without programming).
So the issue is that I'm actually using HTML tags within an Arcade expression, and the Arcade is being recognized by AGO while the HTML within is not? Frustrating, but I think I understand now. Thanks for the information.
Hi Aaron Koelker , it would be great if this was possible (generate HTML code using Arcade) and have an pop-up or label be able to interpret the HTML and show it correctly. I understand your frustration, but Arcade is a new language and still in development. It will take time to reach a point where the same options will be supported in Desktop and ArcGIS Online (and Apps and Enterprise and ... well the entire platform). There are some exciting things planned for future releases and I am sure that what you are looking for will be possible in the future.
I will CC Kelly Gerrow to see if she can share more info on this (for instance if it is in the backlog).
Thank you Xander, I appreciate the help. For now I'm using your suggestion of two redundant layers for labeling, and that's good enough for now.
I just experienced the same problem. Thought, ok I'll use Arcade, only to find out the labels don't translate at all for text formatting. @XanderBakker any update for getting this into the labeling? I was hoping it would at least be in the Mapviewer Beta, but no luck still.
Hi @JaredTaylor ,
Unfortunately, currently this is still not possible to do. I don't know when this issue will be resolved, but I don't see any mention of in the new AGOL to be released on Dec 8. However, I haven't checked this in the Early Adoptors version...
Good Morning Xander,
I'm trying to combine HTML tags and Arcade and see that it's still not available. I'm trying to use superscript tags.
6 years passed, I still have same issue here: