Select to view content in your preferred language

Toggle Services Sample Question

671
2
Jump to solution
04-08-2013 07:03 PM
DanikBourdeau2
Deactivated User
Quick question.  In the Legend -toggle Services Sample (http://developers.arcgis.com/en/javascript/jssamples/widget_legendvisible.html) there are two onLayersAddResult events in the JS script.  One is used for the Legend the other for adding the toggle services.

Why have two events, could they not both be in the same event?  What is the advantage to having them in separate events?

Thanks,
0 Kudos
1 Solution

Accepted Solutions
StephenLead
Honored Contributor
Why have two events, could they not both be in the same event?


I think it's just a mistake someone made when copy/pasting separate samples together into one. There's no reason that you'd need two separate functions which could handle the same thing.

Steve

View solution in original post

0 Kudos
2 Replies
StephenLead
Honored Contributor
Why have two events, could they not both be in the same event?


I think it's just a mistake someone made when copy/pasting separate samples together into one. There's no reason that you'd need two separate functions which could handle the same thing.

Steve
0 Kudos
DanikBourdeau2
Deactivated User
I kind of figured as much.  Thanks for the response 🙂
0 Kudos