Select to view content in your preferred language

Display Symbol in Layerlist for Every Feature Layer at the Left Side of Layer.

226
1
10-03-2024 05:08 AM
ManishGohil
Occasional Contributor

Hi,

I have a question related to the LayerList and the symbols representing layers on the map.

I found many suggestions, but they all create a separate space for each layer and then show symbols. However, I want to display the symbols already available in my system on the left side of each specific feature layer.

Reference Link: https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-list-widget-with-legend-in-...

https://codepen.io/kekenes/pen/VwMPaLL?editors=1000

Note: With the provided link solution it is creating a new div element for every layer. instead of creating new div i want to use my symbols with the same div of that layer in the layerlist.

I want the output as per the attached screenshot 

ManishGohil_2-1727956642651.png
Thank You.

 

1 Reply
Sage_Wall
Esri Contributor

Hi @ManishGohil , this isn't possible with the current API.  Placing the symbols to the left is problematic when they symbology gets more complex and take up much more vertical and horizonal space.  That's one of the reasons behind having them inside the collapsible panels.  We could move this over to the ideas section and see if it gets some votes but the design would be problematic with complex symbology.

This sample shows a much more complex point symbology

https://developers.arcgis.com/javascript/latest/sample-code/widgets-layerlist-legend/

 

0 Kudos