Select to view content in your preferred language

Does Arcade Labeling transfer from ArcGIS Pro to Online

327
3
Jump to solution
08-06-2024 05:51 AM
Labels (1)
FaithBest
Occasional Contributor

Hi All, 

I am trying to figure out if I can create arcade labeling expressions in ArcGIS Pro and have them transfer into the published item so they can be viewed in Map Viewer? Is this possible? 

My guess is it is not possible or would only be able to work in a map image layer and not a feature layer. 

If anyone has any experience with this or knows of documentation I could reference for this topic, I would greatly appreciate it!

0 Kudos
2 Solutions

Accepted Solutions
RussRoberts
Esri Notable Contributor

The labeling in Online/ArcGIS JS SDK does not fully support the full maplex level of configuration you can do in Pro. Arcade expressions are supported but we don't support the use of html tags in our labeling yet if you plan on using those within your expression. If you have anymore details on what labeling you are trying to achieve and I can help out. 

View solution in original post

RussRoberts
Esri Notable Contributor

 

Could be something like

 

 

var name_array = Split($feature.name, ' ')

var first_name = name_array[0]
var last_name = name_array[1]

first_name + TextFormatting.NewLine + last_name

 

 

Before

RussRoberts_1-1722951395112.png

 

 

After

RussRoberts_0-1722951357433.png

 

View solution in original post

3 Replies
RussRoberts
Esri Notable Contributor

The labeling in Online/ArcGIS JS SDK does not fully support the full maplex level of configuration you can do in Pro. Arcade expressions are supported but we don't support the use of html tags in our labeling yet if you plan on using those within your expression. If you have anymore details on what labeling you are trying to achieve and I can help out. 

FaithBest
Occasional Contributor

Thank you @RussRoberts  for your quick help. I am trying to create split two-line labels for polygons in ArcGIS Pro (For like park labels for example), so they are the default in Online. The reasoning behind this as I cannot seem to find a way to do arcade expression labeling once the items are published so they are the default labeling when viewed in the map viewer. 

Still working on the arcade, but it was hopefully going to work somewhat like this:

 

Which I got from: 

Solved: Arcade Split Function: Split a name into first and... - Esri Community

0 Kudos
RussRoberts
Esri Notable Contributor

 

Could be something like

 

 

var name_array = Split($feature.name, ' ')

var first_name = name_array[0]
var last_name = name_array[1]

first_name + TextFormatting.NewLine + last_name

 

 

Before

RussRoberts_1-1722951395112.png

 

 

After

RussRoberts_0-1722951357433.png