How would I add a listener to Robert's layer toggle widget that would be able to tell what layer is on? I want this so that the info can be passed into Survey123 via custom URL
Thanks
Solved! Go to Solution.
Mark,
Did you check the value of layer.id?
Appears to be undefined
So your layer does not have an id or is the layer itself null?
I looked at the Item ID from the AGOL Assistant and one shows there. Same as Layer ID?
But in the topic event the layer does not have an id?
Debugger didn't show that...not the best in FireFox
So use Chrome then.
Just got approval for Chrome. Where am I looking in the Scope?
Once you hit your breakpoint you can just hover over a var and see the objects properties.
in the publishMapEvent function:
-this.SERVICE_ID is null
-no layer is defined somehow
See attached