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

6628
10
Jump to solution
12-01-2018 10:20 AM
FrankMancini
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
XanderBakker
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
XanderBakker
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:

KirkJones
New Contributor II

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.

0 Kudos
XanderBakker
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. 

0 Kudos
AlexanderLynch2
New Contributor III

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.

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi Alexander Lynch ,

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

0 Kudos
KoryKramer
Esri Community Moderator

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?

AlexanderLynch2
New Contributor III

Thank you. 

0 Kudos
XanderBakker
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... 

AlexanderLynch2
New Contributor III

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.