I have added an Image Service to the Layer List widget using JS API 3.19, though the id used in the Layer List does not match the "id" property specified in the properties for this layer. The Image service layer clearly has a "name" property it is using to display the name in the layer list, default value is derived from the layer's service URL as "[directory]/[service name]". I can change the name using the dev console after the layer loads but have found no way to assign a different name in the source file so the desired name is used in the layer list.
I've tried setting a new name/id within the ArcGISImageServiceLayer properties, using ImageLayer.attr(name, value) methods to update the name, and also tried including "map.getLayer("[layerID]").name = [newName]" prior to creating the layer list in my source file, but nothing has worked so far.
Has anybody experienced this same problem and by chance, found a solution? It does not seem that the layer "id" property in the layer list widget is recognized when that layer is from an ArcGIS Server Image Service.
The 'id' specified in the Layers properties in the Layer List widget should display in the layer list
Instead, I get the image service layer's name property displayed.