AnsweredAssumed Answered

legend with dijit/form/DropDownButton

Question asked by tfagin on Nov 13, 2015
Latest reply on Nov 18, 2015 by tfagin

Greetings,


I am very new to the ArcGIS API for Javascript and am by no means a programmer. Nonetheless, I have been fairly successful at finding existing code and modifying it to my needs. That is, until now.

 

I want something that I think should be simple and straightforward. However, despite looking high and low, I cannot find a good code sample. I would like a button that, when clicked, shows or hides a legend (or TOC). Indeed, I have seen multiple examples of this in WebAppBuilder applications and elsewhere, but it has not been easy to tease through the code. Surely, some others have done this.

It seems to me that my answer should be in "dijit/form/DropDownButton." However, this newbie cannot seem to get it to work. My guess is I am overlooking the obvious (or, perhaps, I am approaching it all wrong).

 

Your assistance would be greatly appreciated.

 

I have attached an example of my failed attempt.

 

Thanks in advance.

Outcomes