Hi!
I am trying to use `dragEnabled` with the `LayerList` widget and three `FeatureLayers`, but I cannot reorder my layers. Could someone provide me with a functional example of how to use it?
Thank you.
Hi @Antonio_Fraga ,
If you are using the layer list component you can use the drag-enabled attribute like this:
<arcgis-layer-list drag-enabled position="top-right"></arcgis-layer-list>
https://codepen.io/sagewall/pen/raBNdxq
Or if you are using the widget you set the dragEnabled property to true like so:
const layerList = new LayerList({ dragEnabled: true, view: view });
https://codepen.io/sagewall/pen/vEBYRGN
Hope this helps 🙂
Hi @Sage_Wall ,
I just realized, thanks to your example, that it was referencing version 4.28 of the API. I updated it to 4.31, and it works perfectly.
Thank you!
@Antonio_Fraga
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.