Select to view content in your preferred language

Map Viewer: How to left justify alignment in Label Style, like we can with Pop-Up Configuration

1554
3
Jump to solution
01-03-2024 02:43 PM
Labels (2)
FayGlunt
Occasional Contributor

How can we style a label for a symbol we uploaded using a SVG to be text-align: left?  We can do this for pop-ups using the html editor, like here:
https://support.esri.com/en-us/knowledge-base/how-to-use-arcade-expression-to-configure-the-text-for...

We found we could do these:
https://developers.arcgis.com/arcade/function-reference/text_functions/https://support.esri.com/en-u...

But we could not find text alignment.  So, we are forced to have them all be centered.

Can we do something with this?
Arcade | Overview | ArcGIS Maps SDK for JavaScript 4.28 | ArcGIS Developers

 

 

0 Kudos
1 Solution

Accepted Solutions
RussRoberts
Esri Notable Contributor

Currently polygon alignment is not supported and the only property for labelplacement is 

always-horizontal
 
The alignment property is not supported and wont be read if its in the web map or layer configuration.

View solution in original post

0 Kudos
3 Replies
RussRoberts
Esri Notable Contributor

Can you share the SVG you are uploading? We currently dont expose controls on elements within a symbol layer but depending on how the symbol is generated you could manually add the JSON to it after or use Pro. 

0 Kudos
FayGlunt
Occasional Contributor

I wrote on behalf of a teammate to help out, as we are really busy.  And, I misspoke.  Sorry.

This particular issue is not with regards to a SVG.

This is a polygon feature service with a label class.  

The text within the label class needs to be left aligned in this particular example, but we will have use cases where we may need right as well.  See attached screenshots.

We also have a point feature service with a label class, where we need to left align.

We were looking for a way within the label class to align text left, center or right.

We are currenting using Map Viewer to define our label class.  We have the ability to use ArcGIS Maps SDK for JavaScript, if that is the direction that we need to head.

In addition, we are using arcade to populate attributes within the label.

0 Kudos
RussRoberts
Esri Notable Contributor

Currently polygon alignment is not supported and the only property for labelplacement is 

always-horizontal
 
The alignment property is not supported and wont be read if its in the web map or layer configuration.
0 Kudos