I am looking to do a feature layer which I have set up with a renderer with a CIM Symbol. I want to change the color of theCIMPictureMarker based on an attribute of the feature. My current code doesnt let me change the color. Is this the best renderer to use? I did not use a unique value renderer since I dont need to compare the value I want to use. I am also curious if I can rework valueExpressionInfo to call a function.
Thanks in advance
{
type: "simple",
symbol: new CIMSymbol({
data: {
type: 'CIMSymbolReference',
primitiveOverrides: [
{
type: 'CIMPrimitiveOverride',
primitiveName: 'imageMarker',
propertyName: 'replacementColor',
valueExpressionInfo: {
type: 'CIMExpressionInfo',
expression: '$feature.statusColor',
returnType: 'Default',
},
}
],
symbol: {
type: 'CIMPointSymbol',
primativeName: "imageMarker",
symbolLayers: [
{
type: "CIMPictureMarker",
enable: true,
size: 20,
scaleX: 1,
colorSubstitutions: [
{
targetColor: [255, 0, 0, 255], // red
replacementColor: [0, 0, 255, 255] // blue
}
]
url: "https:////myCnd/images/defaultImage.png"
},
],
},
}
})
}