操作方法
在 ArcGIS Online 和 Portal for ArcGIS Map Viewer 中,当多个字段中存在相同的字段值时,可以使用条件 Arcade 表达式来显示串联标注。 在本文中,要素图层包含两个名为“Married”和“Employed”的字段。 在使用 Arcade 表达式的情况下,当要素在两个字段中均包含字段值“Yes”时,可以通过串连字段名来创建标注。
下图显示了其中包含两个字段和字段值的表。

。 通过切换启用标注选项,确保启用标注。
。
var output = '';
if ($feature['<field_name1>'] == '<field_value>'){
output = '<output1> ';
}
if ($feature['<field_name2>'] == '<field_value>'){
output += '<output2>'
}
else{
output = '<output3>'
}
return Trim(output);
Note:
If numeric or date field values are used, remove the single quotes (' ') on <field_value>.
Note: If a different concatenating label is desired, users can configure the output statements to something other than the names of fields.

下图显示了 web 地图上的串连标注。

文章 ID: 000029386
获取来自 ArcGIS 专家的帮助
立即开始聊天