Select to view content in your preferred language

Stacking labels in Map Viewer doesn't show in Web App

824
3
Jump to solution
05-30-2023 05:53 AM
Labels (2)
NonieCastro1
New Contributor II

I created stacking labels in the Map Viewer, and now I want to create a Web App to share the map with my organization, but when I preview the map in the app, the labels are all on one line. 

Here's the expression I used: 

$feature.NTA + TextFormatting.NewLine + "SFDU: " +  $feature.Avl_SFDU + TextFormatting.NewLine + "Rev: " + $feature.AvgRev2023
0 Kudos
1 Solution

Accepted Solutions
NonieCastro1
New Contributor II

I got it! Instant Apps, then Basic. 

WebAppBasic.JPG

View solution in original post

0 Kudos
3 Replies
KenBuja
MVP Esteemed Contributor

You're probably using a web map built with Map Viewer in Web AppBuilder. The Map Viewer is built with the ArcGIS Maps SDK for JavaScript 4.x, which supports TextFormatting.NewLine. Unfortunately, Web AppBuilder is build with the 3.x version of that API, which doesn't support TextFormatting.NewLine. If you open the web map in Map Viewer Classic (also built with 3.x), you'll see that the labels are also on one line.

0 Kudos
NonieCastro1
New Contributor II

Hmmm... okay. Is there a way for me to share this map and keep the stacking labels? I had it on last year's map (I update this once a year), but I stupidly deleted the previous map before building this one, thinking it would be no big deal. Lesson learned.

0 Kudos
NonieCastro1
New Contributor II

I got it! Instant Apps, then Basic. 

WebAppBasic.JPG

0 Kudos