Select to view content in your preferred language

Configuring renderer with nested property

263
1
03-12-2024 06:49 AM
HardikVarshney
New Contributor II

Hi, I have a client side GeoJson layer with nested attributes. I am trying to use nested key(in field) for configuring renderer but this does not works for me. 

Can someone suggest the possible way to use nested property in renderer.

Attaching code snippet for reference

export const renderer = () => {
    const symbol= setPictureMarkerSymbol(recycle);
    const symRenderer = new ClassBreaksRenderer({
        field: 'materialAcceptedDetail[0]["materialId"]',
        legendOptions: {
            title: "Facility"
        },
    });
    symRenderer.addClassBreakInfo({
        minValue: 1,
        maxValue: 3,
        symbol: symbol
    });
    return symRenderer;
};

.

0 Kudos
1 Reply
JoelBennett
MVP Regular Contributor

Please see this thread and this thread, which discuss how to deal with nested properties in a GeoJSON layer.

0 Kudos