Select to view content in your preferred language

WAB Developer Legend Issues (Overpopulation)

2022
1
04-04-2016 11:38 AM
BrianO_keefe
Honored Contributor

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.

  1. One layer is a QUERY LAYER for the "CURRENT MONTH" crimes.
  2. The other layer is a QUERY LAYER for the "CURRENT YEAR" crimes.

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.

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Brain,

  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.

0 Kudos