I am beginning to learn to use the ArcGIS API for Javascript.
I am trying to add a layer of Traffic Lights from an Open Data WMS data feed but I get the following error:
ExportWMSImageParameters.js:5 Uncaught TypeError: Cannot read property 'on' of null
at Object.set (ExportWMSImageParameters.js:5)
at a.set (init.js:237)
at Object.set [as layer] (init.js:326)
at h (init.js:309)
at Object.h (init.js:309)
at Object.set (init.js:218)
at Object.postscript (init.js:217)
at new <anonymous> (init.js:228)
at Object.b.attach (WMSLayerView2D.js:6)
at a._attachLayerView (MapView.js:35)
Please see my HTML, CSS and Javascript files on JSBin
There's a bug that should be fixed in the next release