Select to view content in your preferred language

Confused about Arcade labeling compatibility between Desktop and Online.

3043
8
Jump to solution
01-17-2018 07:48 AM
AaronKoelker
Frequent Contributor

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. #

ArcGIS Pro arcade labeling

ArcGIS Online arcade labeling

-Aaron
1 Solution

Accepted Solutions
XanderBakker
Esri Esteemed Contributor

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). 

View solution in original post

8 Replies
XanderBakker
Esri Esteemed Contributor

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). 

AaronKoelker
Frequent Contributor

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.

-Aaron
0 Kudos
XanderBakker
Esri Esteemed Contributor

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).

AaronKoelker
Frequent Contributor

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. 

-Aaron
JaredTaylor
Occasional Contributor

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.

0 Kudos
XanderBakker
Esri Esteemed Contributor

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...

0 Kudos
DJB
by
Regular Contributor

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.

return $feature.SOILCODE1 + "<SUP>" + prcnt1 + "</SUP> - " + $feature.SOILCODE2 + "<SUP>" + prcnt2 + "</SUP>";
 
The figure below illustrates what I am attempting to do.  
 
DJB_0-1695303956252.png

 

 It's been almost three years since this post.  Has Esri made any headway into this?
 
This is really needed and I hope that Esri is working on this.  I've seen "roadmaps" for things like Experience Builder.  Is there maybe a roadmap for either AGOL development or Arcade for that matter?  It would be nice to see that Esri is in fact working on this.
 
Thanks Xander.
 
~Dan
hoogw
by
Occasional Contributor
0 Kudos