I am working with primitive overrides to change the image URL of for a feature. I want to set the CIMPictureMarker based on an attribute. Eventually my if statement will grow more complex, but I am starting with a basic change out of the image URL.
I have created a script tag in my HTML to return a different image based on the value of an attribute
const serviceArcade = document.getElementById("serviceTag").text;
const serviceOrderRenderer = {
type: "simple",
symbol: new CIMSymbol({
data: {
type: 'CIMSymbolReference',
primitiveOverrides: [
{
type: 'CIMPrimitiveOverride',
primitiveName: 'imageColorOverride',
propertyName: 'url',
valueExpressionInfo: {
type: 'CIMExpressionInfo',
expression: serviceArcade,
returnType: 'Default',
},
}
],
symbol: {
type: 'CIMPointSymbol',
primativeName: "imageMarker",
symbolLayers: [
{
type: "CIMPictureMarker",
enable: true,
primitiveName: 'imageColorOverride',
},
],
},
}
})
}It gives me an errors saying ParsingError: Unexpected identifier. Why does it say it cant parse an if statement?