Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No labels display in simple renderer #46

Open
jcbridwe opened this issue Oct 4, 2019 · 0 comments
Open

No labels display in simple renderer #46

jcbridwe opened this issue Oct 4, 2019 · 0 comments

Comments

@jcbridwe
Copy link

jcbridwe commented Oct 4, 2019

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant