4.0 beta UniqueValueRenderer not rendering

3067
1
Jump to solution
07-23-2015 05:02 PM
by Anonymous User
Not applicable

Hi - Just testing out the 4.0 beta API. I must be doing something wrong in the parameters because my whole layer is symbolized with the Default symbol?

    var outline1= new SimpleLineSymbol({
        color : [255, 0, 0, .5],
        style : 'solid',
        width : .5
    });

    var sym1= new SimpleFillSymbol({
        color : [0, 0, 0, 0],
        outline : outline1,
        style : 'solid'
    });

    var sym2= new SimpleFillSymbol({
        color : [0, 0, 255, .5],
        outline : outline1,
        style : 'solid'
    });

    var easementUVR = new UniqueValueRenderer({
        attributeField : 'IData.dbo.O4.Stat',      // Joined field in the service
        defaultLabel : 'Test Default',
        defaultSymbol : sym1,
        infos : [{
            value : 'Test1',
            symbol : sym2,
            label : 'Test 1'
        }]
    });
0 Kudos
1 Solution

Accepted Solutions
YannCabon
Esri Contributor

Hi Sarah,

Unfortunately, renderers are not yet using the single object constructor.

Despite what the API reference indicates. We will make the changes in beta2 and your code should work then.

In the meantime, here is a sample from 3.x that I ported to 4.0beta1.

JS Bin - Collaborative JavaScript Debugging

View solution in original post

1 Reply
YannCabon
Esri Contributor

Hi Sarah,

Unfortunately, renderers are not yet using the single object constructor.

Despite what the API reference indicates. We will make the changes in beta2 and your code should work then.

In the meantime, here is a sample from 3.x that I ported to 4.0beta1.

JS Bin - Collaborative JavaScript Debugging