Select to view content in your preferred language

Legend CheckBox Events

648
2
05-30-2011 10:00 AM
TonyThatcher
Deactivated User
Hello. One more thing and hopefully I'm in good shape here.

I have several layers that are large so I set the Mode to "OnDemand" so that more than the defalut 500 features are loaded.  These layers are in my legend using legend templates and toggle on and off just fine once the data is loaded.  It seems that the OnDemand mode requires some refresh event so that it knows to grab data.  So when I click the layer on, check the box in the legend, the data is only displayed once I pan or zoom the map a little bit. 

So, how do I force the layer to load when I first click the check box in the legend?

-T
0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
I was eventually able to reproduce the issue but only with 2.1 version. Looks working well with version 2.2.

Which version are you using? If 2.1, could you give a try with 2.2?

Thanks
0 Kudos
TonyThatcher
Deactivated User
Dominique-
I'm using 2.1 and am hesitant to go to 2.2 as it would require the client to be running in a Beta environment. 

I'd prefer a little snippet of code that fires when the check box for certain layers is clicked in the leged.  For example
on click
if checked, then
   if layername = one of the names that is an OnDemand layer then
      run a refresh on that layer's data
   end if
end if

-T
0 Kudos