How do I change the layer label to be only what the name of the layer is?
I am using the Developer edition.
I want it to say Building Labels and not Interior_ - Building Labels
Ricky,
See my previous answer of this:
rscheitlin I should also add that I am adding the layer with the LocalLayer widget.
I have uncommitted out that section but it seems to work for the layer list not the legend.
Thank you
Rickey,
That is very odd because there is code in the LL widget to set the legend title to exactly what the layer name is in the LocalLayer widgets settings. What does your LL widget config.json look like?
rscheitlin I should also add that it is mostly using the LL widget. It is using my custom LL widget that I made a few years ago. It does not use the config.json.
I was able to get the LayerList widget to remove the unwanted labels just not the legend.
Rickey,
That could be the issue then. Hard to say. I remember in one of the releases of LL widget I added code to specifically set the layer legend title.
Robert,
Thank you. I was hoping it was not my widget but something else that could be changed.
Robert,
Do you remember what release that was?
Rickey,
No I don't (to many widgets and versions). But here is the line in question (line 2):
if (layer.name) {
lLayer._titleForLegend = layer.name;
lLayer.title = layer.name;
lLayer.noservicename = true;
}
I will try to make that work.
Thanks!