ArcGIS Online Web Map change label font, color, weight, etc... with Arcade?

2191
10
Jump to solution
12-01-2018 10:20 AM
New Contributor III

Is it possible to set the properties of labels in ArcGIS Online web maps using a custom expression?

Any way similar to adding tags like in the ArcPro examples? Text formatting tags—ArcGIS Pro | ArcGIS Desktop 

Saw this Arcade Label example ( Arcade | ArcGIS API for JavaScript 4.9 ), but couldn't figure out how to make it work in a WebMap Custom Label Expression.

Any ideas?

1 Solution

Accepted Solutions
Esri Esteemed Contributor

If you are using a normal web map and no programming, then I am afraid that this will not work, since the Text Formatting Tags are not honored when using Arcade to define the expression:

View solution in original post

10 Replies
Esri Esteemed Contributor

If you are using a normal web map and no programming, then I am afraid that this will not work, since the Text Formatting Tags are not honored when using Arcade to define the expression:

View solution in original post

New Contributor

Is it still the case that you cannot customize these labels?  I am trying to format labels within the same feature layer to be different colors depending on property type.  I'm not sure if or how I can go about it.

Reply
0 Kudos
Esri Esteemed Contributor

I'm afraid that it is still the case. I assume that this will be possible later on, since you can do this in Pro and Esri wants this  to be possible in the web map too. 

Reply
0 Kudos
New Contributor II

So, currently, there's no way to reproduce labeling expression from ArcPro to ArcOnline?

Where top-floating window is ArcPro labels & bottom window is ArcOnline labels.

Reply
0 Kudos
Esri Esteemed Contributor

Hi Alexander Lynch ,

I´m afraid that is correct. Currently, you can't do this with ArcGIS Online.

Reply
0 Kudos
Esri Notable Contributor

Have you guys tried in the Map Viewer Beta?  Looks like it now supports different label classes as well as Arcade expressions for labels: New Labels in ArcGIS Online's Map Viewer Beta: Make your maps shine 

Maybe that helps?

New Contributor II

Thank you. 

Reply
0 Kudos
Esri Esteemed Contributor

Hi Kory Kramer ,

I did try the new label author in the map viewer beta, but it does not support using HTML tags like CLR, FNT, BOL, etc that are supported in Pro. You can probably come close, but for each change in font and color you need to create a label class. See also my comments here: https://community.esri.com/community/arcgis-online-map-viewer-beta/blog/2020/02/08/check-out-label-a... 

New Contributor II

I agree. Still have the same result. I find it a bit awkward when the expressions work on desktop and mobile, but cannot carry over to ArcOnline.