Layer in legend doesn't display at all times

2166
2
11-03-2015 12:03 PM
KPearson
New Contributor

The symbol that represents my Layer1 only displays part of the time in the legend.  If I zoom in and out sometimes I can see it flash for a split second.  Layer2 displays at all times.  Sometimes it will display initially and then upon zooming in it disappears. The title for Layer1 displays at all times.  Both are feature layers. 

var legend = new Legend({

                map: map,

                layerInfos: [

                {

                    layer: Layer1,

                    title: "Layer One"

                },

                {

                    layer: Layer2,

                    title: "Layer Two"

                }]

                }, "legendDiv");

                legend.startup();

Tags (1)
0 Kudos
2 Replies
TimWitt2
MVP Alum

K,

the Legend widget only shows layers that are currently visible. Maybe this is your problem?

Tim

0 Kudos
KPearson
New Contributor

Both layers are always visible and in view.

0 Kudos