Will MapImageLayer ever support Arcade label expressions?

804
2
Jump to solution
08-29-2019 12:33 PM
Andy_Morgan
New Contributor III

Would someone from ESRI please tell us if MapImageLayer will eventually support Arcade expressions (and therefore TextFormatting.NewLine) via LabelClass?

Currently LabelClass labelExpressionInfo : { expression: .... } is only an option for FeatureLayer, but I really need it to be available through MapImageLayer in order to have multiple field and multiple line labeling. Otherwise, the only workaround to my knowledge is to create a duplicate FeatureLayer from a MapImageLayer's sublayer, add it to the map, hide feature graphics, and then apply labeling. This is not a viable solution.

0 Kudos
1 Solution

Accepted Solutions
Noah-Sager
Esri Regular Contributor

Hi Andy, it's a great question. We will investigate and consider. In the meantime, you can do some fancy things with SQL (e.g. multiple fields and multiple lines) like this:

labelExpression: '[STATE_ABBR] CONCAT " State, \\n" CONCAT [STATE_NAME]'

sample app

https://codepen.io/noash/pen/RwbMWab 

View solution in original post

2 Replies
Noah-Sager
Esri Regular Contributor

Hi Andy, it's a great question. We will investigate and consider. In the meantime, you can do some fancy things with SQL (e.g. multiple fields and multiple lines) like this:

labelExpression: '[STATE_ABBR] CONCAT " State, \\n" CONCAT [STATE_NAME]'

sample app

https://codepen.io/noash/pen/RwbMWab 

Andy_Morgan
New Contributor III

Excellent, Noah!  Thanks so much, this will certainly do!

I didn't realize this SQL syntax was allowed. While Arcade for MapImageLayers might still be on the wish list for some developers, multi-line labeling was my only goal here.