Skip to content

How can I set symbol color by diferent value? #48

@Aaronsi

Description

@Aaronsi

my code is:
var simpleJson = {
"type": "simple",
"label": "",
"description": "",
"symbol": {
"color": [210,105,30,191],
"size": 10,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"type": "esriSLS" // esriSMS, esriSLS
}
"visualVariables": [{
"type": "color",
"field": "status",
"stops": [
{ "value": 1, "color": [52,176,0,191]},
{ "value": 2, "color":[254,203,0,191]},
{ "value": 3, "color":[223,1,0,191]}
]
}]
};
geoJsonLayer.renderer = new SimpleRenderer(simpleJson);

The problem is that it doesn't work. Can you give me some suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions