I have a custom widget, with which I can add new map service layers produced by my gp services to the basemapt, and the layers appear in LayerList widget. But the labels of the layers in the widget are layer1, layer2... sub-labels are empty, not the names of the layers. How to make it show actual meaningful names of layers? Any suggestions will be appreciated much.
Coco,
Can you share a code snippet of this?
add new map service layers produced by my gp services to the basemapt
Are you actually adding layer to a basemap or do you mean the map?