Map Widget Editor Labels Tab

<< Click to Display Table of Contents >>

Navigation:  Enterprise > Widgets > Map > Widget Editor  >

Map Widget Editor Labels Tab

To change the properties of the Map widget, open the Widget Editor by selecting the More Options Ent-More_Options-Icon icon in the upper right corner of the widget to display the drop-down menu and then select the Edit menu option. The Map widget properties are divided into six tabs. Changes made on any tab will not be preserved until the user clicks Save on the Widget Editor header.

 

The Labels tab is enabled when the Show Facility Layer box is checked on the General tab.

 

Note: As of Build 7.19144, the Esri JS API has been updated to 4.11 and location labeling has been updated to use Esri LabelClass (https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.htm) for labeling, which adds some new functionality but may introduce breaking changes for some users who are accustomed to the older label templates. For users who only display a single column as a label, nothing has changed—the Map widget has been updated to convert simple widget configurations to the new syntax (https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html#labelExpressionInfo). More complex configurations will need to be updated manually.

 

Essentially, the label template is no longer just a template for a text symbol but is an Arcade expression (https://developers.arcgis.com/arcade/). Instead of using curly braces to reference fields, it is now necessary to reference the feature that the fields belong to with "$feature.", and then the name of the field. Also, concatenation is no longer implied and has to be explicit. So, the previous example in the documentation "{sys_loc_code} - {loc_type}" would look like this in Arcade: "$feature.code + ' - ' + $feature.type".

 

Ent-Map_Widget_Editor_Labels

Show Location Labels – Check this box to display location labels for selected facility.

Label Column – Select the Column to be displayed for the labels (e.g., select "code" to display SYS_LOC_CODE).

Font Family – Select the drop-down menu to display available font types. Scroll to and select the desired font type. The Label preview field will reflect the selected font type.

Font Size – Set the font size for the labels.

Font Color – Set the font color for the labels. Click on the color selector to choose a color. The Label preview field will reflect the selected font color.

Font Weight – Set font weight for the labels. Select the drop-down menu to display available font weights. Choose from normal, lighter, bold, and bolder. The Label preview field will reflect the selected font weight.

Custom Label Template – An optional setting to use an Arcade expression for labels using combinations of fields (example: "$feature.type + ' - ' + $feature.code").

Label Angle – Controls the rotation of the labels within the range -360 to 360 degrees. The center point for the rotation is the lower-left corner of the label. For example, a value of -30 would rotate the labels 30-degrees counter-clockwise.

X-Offset for label (changing in next release) – This setting is used to control the pixel offset of a label. With labeling moving to use LabelClass for 2D Feature Layers, positioning is now handled using human-readable terms like "left, center, right". The legacy numerical pixel offsets are converted to the new setting as follows: any negative offsets become "left", zero becomes "center", and any positive offset becomes "right". The next build of Enterprise will update this setting to use the human-readable terms.

Y-Offset for label – (changing in next release) – This setting is used to control the pixel offset of a label. With labeling moving to use LabelClass for 2D Feature Layers, positioning is now handled using human-readable terms like "left, center, right". The legacy numerical pixel offsets are converted to the new setting as follows: any negative offsets become "left", zero becomes "center", and any positive offset becomes "right". The next build of Enterprise will update this setting to use the human-readable terms.

Halo Size – If a halo is desired, set the size for the labels.

Halo Color – If a halo is desired, set the halo color for the labels. Click on the color selector to choose a color.