I used the LayerList widget and got it to work. Then, I tried adding jquery code with a slide toggle so that the LayerList could be displayed and then hidden so that more of the map was visible. However, I am getting an error when I try to view my html saying that the "$ is undefined" in my $(document).ready() statement. My html is attached.
I made a rookie mistake. The link href= and the script src= were not listed as a URL, but instead were referencing folders within a specific Visual Studio solution.
Instead of hosting jQuery, you can reference the CDNs:
jQuery CDN
This has the added benefit that it'll increase the likelihood of your visitors already having a cached instance of jQuery. It may not make a difference in your case, though. It can be quite noticeable in scale, however.
Chris,
Thank you so much for your wisdom. I will indeed use your advice.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.