Skip to content

No labels display in simple renderer #46

@jcbridwe

Description

@jcbridwe

In the geojsonlayer.html file, I see there is commented out code for the simple renderer. I just want to add a label to display with my layer. The below code doesn't seem to work out of the box for the "label" attribute; no label displays. Is there something else I need to do here?
```
//Optional SimpleRenderer if you don't want a random symbol and color
var simpleJson = {
"type": "simple",
"label": "labels",
"description": "A bunch of stuff about layers",
"symbol": {
"color": [210,105,30,191],
"size": 10,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"type": "esriSLS" // esriSMS, esriSLS
}
};
geoJsonLayer.renderer = new SimpleRenderer(simpleJson);

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