I would like for my users to be able to turn layers on and off so they can see just street signs or supports. I have tried using this widget, but it does not work: http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109http://Is there a way to add a checkbox next to the layer in the legend widget to turn layers on/off...
My code for starting the legend is the following:
app.legend = new Legend({
map: app.map,
layerInfos: [{
title: app.supportLayer.name,
layer: app.supportLayer
}, {
title: app.signLayer.name,
layer: app.signLayer
}]
}, "legend");
app.legend.startup();
Solved! Go to Solution.
I used the "default.html" file and it appears to show all the layers in your services. The only edit was to remove the proxy configuration. Which layers are missing?
Here is the file I uploaded that doesn't work. It kind of works, but does not show all layers.
I used the "default.html" file and it appears to show all the layers in your services. The only edit was to remove the proxy configuration. Which layers are missing?
I tried it and I set always use proxy to false. There appears to be a delay before it populates, but it does populate. Thanks @Ken_Buja. I'll try to add it to my application.
kenbujais right. I also use this widget a lot and it's now updated as well.
It's been updated? When was that? I might want to try out the update.