So I have a crime map I'm developing using the the WAB 2.0 and I'm having issues.
I have two layers in my map.
I need the Legend to show only Crime Codes being displayed. But instead I get ALL crime types in the legend.
Any ideas of how to manage the legend entries that are displayed?
I even went back to the MXD and removed ALL other layers. So the MXD only has the same two layers that my web map shows.
Currently this is not possible in the JS API Legend dijit. It will respect current layer visibility but not actually limit the layers legend items based on what is visible in the map like ArcMap does.