TransWikia.com

adding line breaks to labels in ArcGIS Online

Geographic Information Systems Asked by Zachary on April 9, 2021

I’m using the new labeling functionality in ArcGIS Online. My question is how do I add a line break to the label if I want to use more than one field?

4 Answers

This is not possible in the current release of ArcGIS Online. You can add multiple fields to the label, but they will be drawn right to each other. You can of course add custom text by typing it into the text field, for instance.:

ID:{OBJECTID} // NAME:{NAME}

Correct answer by Alex Tereshenkov on April 9, 2021

I know I'm about 4 years late to the party, but this is the best workaround. Use the Concatenate to string features together and TextFormatting.Newline to create a break function. Here is some example code:

Concatenate('Population: ',$feature.POPULATION, 
TextFormatting.Newline, 'Demographic ', $feature.DEMOGRAPHIC)

Answered by Jacob Longridge on April 9, 2021

You may check the below link as a reference. I didn't test the sample code yet, but i think it will help you as needed

https://developers.arcgis.com/javascript/3/jssamples/labels_arcade.html

Answered by khaleel on April 9, 2021

It's the end of 2020 and there still isn't a way.

Here is an Esri tech support artice that gives a work around if you have values from multiple fields.

As a workaround, use two-layer labeling with top and bottom alignments for the desired feature layer in ArcGIS Online.

Note: These steps are only applicable to point feature layers and not polygon feature layers. For line feature layers, there are only three types of alignments.

Answered by JMers on April 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP