AnsweredAssumed Answered

How to set a layer name while adding a new layer

Question asked by michel.turmelcgi on Sep 28, 2020
Latest reply on Oct 15, 2020 by equinoxgeospatial

I am in the process of creating my first custom 2 D widget and I can dynamically add a layer on the map but when I use the standard Layer List widget I see that the name of the layer I added to the map is  the name of the Map Service that I have used. Is there a way to set the name of the new layer that will be displayed when I use the standard Layer List widget?

Here is my environment:

   - Portal for ArcGIS version 10.6

   - Web AppBuilder Developer Edition 2.6

   - ArcGIS JavaScript API 3.33