I am working with a series of maps in AGO and would like to create nuanced label expressions--e.g. stuffing a carriage return into the label (as we've done with VB and Python, in Desktop). Is this doable as yet (perhaps through the use of inserted special characters, html markup, etc.)?
thanks
-caminante
Solved! Go to Solution.
Hi Robert and Kevin,
Currently the 3X Javascript API does not support the Arcade expression that adds a newline.
This web map, has the proper expression, but you will see that the labels are not stacked:
Arcade Expression: "APN: "+$feature.PIN +TextFormatting.NewLine+ "Acres: "+Round($feature.ACRES, 2)
However, when this app is included in a 4X Javascript API, the Newline function is applied to the labels:
https://onlineshowcase.maps.arcgis.com/apps/Media/index.html?appid=fa4ad95adbad410aaf00790a3c18d0f8
Currently, Media Map, Styler and Minimal Gallery are available in 4X and can take advantage of the Newline function with Arcade.
-Kelly
Hi Robert, adding nuanced label expressions can be accomplished by editing web maps creating in ArcGIS Online or ArcGIS Enterprise using the Map Viewer and working with Arcade expressions. Arcade provides formatting functions as well as global variables that provide direct access to features in the map for labeling purposes. Here is an example web map that illustrates the process involved.
Hi Robert and Kevin,
Currently the 3X Javascript API does not support the Arcade expression that adds a newline.
This web map, has the proper expression, but you will see that the labels are not stacked:
Arcade Expression: "APN: "+$feature.PIN +TextFormatting.NewLine+ "Acres: "+Round($feature.ACRES, 2)
However, when this app is included in a 4X Javascript API, the Newline function is applied to the labels:
https://onlineshowcase.maps.arcgis.com/apps/Media/index.html?appid=fa4ad95adbad410aaf00790a3c18d0f8
Currently, Media Map, Styler and Minimal Gallery are available in 4X and can take advantage of the Newline function with Arcade.
-Kelly
Awesome, thanks for that helpful clarification and insight Kelly!