Multi-line labels

13473
11
12-12-2017 01:11 PM
deleted-user-P-Gckloxqib2
New Contributor III

Does anyone know how to label a feature class with multiple lines in ArcGIS Online? On Desktop, labels can be done via:

Zip Code

City Name 

Population 

... I am hoping to do the same with ArcGIS Online. 

Thanks for your help!  

Tags (2)
0 Kudos
11 Replies
XanderBakker
Esri Esteemed Contributor

Hi Andy Morgan ,

The MapViewer of ArcGIS Online is currently based on the 3.x JavaScript API and in the rewrite will take advantage of the features which are part of the 4.x JavaScript API. The NewLine is already in 3.x supported in the pop-ups but with the 4.x API will also be supported in the labels. 

I do not know if there will be support for the MapImageLayer.

0 Kudos
GeeFernando
Occasional Contributor

As Xander Bakker‌ pointed out - this works in ArcGIS API 4.x related products - https://community.esri.com/ideas/15261 

But, if folks are still using ArcGIS API 3.x apps (e.g. Operations Dashboard) - this functionality wouldn't work - as stated in the Arcade Documentation.

An interim solution would be to - pass a HTML tag for line breaks instead - <br />

For example:

   {expression/expr0} + "<br />" + {expression/expr1}

This will cause any 4.x - apps and maps to look horrible, but will do the trick for 3.x related products.