提出的实施
: 条件不当检查无效的值,导致不正确的行为:'icon-image': [
'case',
['==', ['get', ['to-string', ['get', objectIdField?.name]], ['literal', { ...textExpression[2][1] }]], null],
null, // Use the icon if the field has a value
background, // Hide the icon otherwise
],
任期实施
: 该条件已被简化并纠正以直接检查字段值是否为null:
'icon-image': [
'case',
['==', ['get', 'fieldName'], null], // Check if the field is null
'none', // Hide the icon for null values
background, // Use the specified background icon for non-null values
],