Hello again all. I am still having problems accessing individual layers within my WebMap thru the js API.
if I have loaded an existing webmap visually in my app-
Solved! Go to Solution.
I think you have a typo. It's findLayerById.
You need to either wait for view.when() or call the webmap.loadAll(), both are promises so you can await them or use promise.then().
I think you have a typo. It's findLayerById.
You need to either wait for view.when() or call the webmap.loadAll(), both are promises so you can await them or use promise.then().
Ah yes, a lower-case "D" thank you.
okay, "view.when" is where I went and it seems to work fine. thanks everyone!
here is the way I did it, using the layer 'title'. and the code for a dropdown checkbox for the layers visible/not visible.