Select to view content in your preferred language

New line labels not stacking in Map Viewer Classic

819
2
Jump to solution
10-19-2022 05:30 AM
hherrmann_coj
Occasional Contributor

Edit to admins: This should probably be in Portal questions but I don't see a way to move it.

Hello everyone.  I am working on a map in our Portal so I can build a web application for a project we have coming up.  For some reason, I am able to successfully use the following expression to stack two fields in the label in Pro, but not in Map Viewer Classic.  

Expression:
"MM" + " " + $feature.trl_mm_numb
+ textformatting.NewLine
+ $feature.comments

Result in Pro:

hherrmann_coj_0-1666182498279.png


Result in Map Viewer Classic (in Portal)

hherrmann_coj_1-1666182536362.png

Any ideas?

1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

The Map Viewer Classic uses the JavaScript 3.x API, which doesn't support NewLine. The new Map Viewer (built with the JavaScript 4.x API) does support NewLine.

View solution in original post

2 Replies
KenBuja
MVP Esteemed Contributor

The Map Viewer Classic uses the JavaScript 3.x API, which doesn't support NewLine. The new Map Viewer (built with the JavaScript 4.x API) does support NewLine.

hherrmann_coj
Occasional Contributor

That feels much like being forced to use Pro over ArcMap because upgrades and support will be ending eventually.  I'm not a fan of the new Map Viewer yet for similar reasons that I'm not a fan of Pro yet, although I am forcing, begrudgingly, myself to use Pro.  LOL!

Thank you so much for your feedback though.  I appreciate it and "reckon" I'll go open my map in the new Map Viewer, sadly.  LOL!

0 Kudos