Dear Users,
I am working ona module where the user need a table of content(layer name)with check boxes
and a slides beside very layer name which can control opacity.
I tried some examples but could not reach any thing.
Any guide on this will be helpful.
Thanks
Aditya Kumar
Hi Aditya,
You can try to take a reference about this user created sample that shared in arcgis.com: https://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109
Technically if you need to change the layer opacity you need to take look this API documentation:
ArcGISDynamicMapServiceLayer | API Reference | ArcGIS API for JavaScript
Hope this can help, also we recommend you use AMD style for JS
I have a layer list control that you might be able to use: WSDOT-GIS/arcgis-js-layer-list · GitHub
A lot of people are using the TOC widget mentioned above, https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com%2Fhome%2Fitem.html%3F...
It's part of the functionality to allow you to change the opacity of an individual layer. It's always worked fine for me. If one of the examples provided is close to what you want, but you're having problems with it, you ought to be able to post your code and get some assistance.
Hi All,
I am able to bring the list of check boxes in my map using layerlist widget.
var myWidget = new LayerList({
map:map,
layers: []
},"layerList");
myWidget.startup();
And its working fine. Need to add the opacity slider next to each layer.
Any suggestion?
Thanks
Aditya Kumar
Take a look at this example that uses the LayerList with a opacity slider.
Here's another one you could try out: