<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cannot read property 'on' of null     at Object.set (ExportWMSImageParameters.js:5) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-read-property-on-of-null-at-object-set/m-p/761024#M70537</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue is resolved in 4.5. I just tested with the sample and it works just fine without the uopdates.d.ts file included.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Oct 2017 16:28:40 GMT</pubDate>
    <dc:creator>KellyHutchins</dc:creator>
    <dc:date>2017-10-06T16:28:40Z</dc:date>
    <item>
      <title>Cannot read property 'on' of null     at Object.set (ExportWMSImageParameters.js:5)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-read-property-on-of-null-at-object-set/m-p/761021#M70534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;possilel bug issues about WMSLayer (api:4.4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting error while trying to use WMSLayer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: Cannot read property 'on' of null &amp;nbsp; &amp;nbsp; at Object.set (ExportWMSImageParameters.js:5)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sample code from Sandbox: layers-wms&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;esriConfig.request.corsEnabledServers.push(&lt;BR /&gt; "mesonet.agron.iastate.edu");&lt;/P&gt;&lt;P&gt;layer = new WMSLayer({&lt;BR /&gt;&lt;SPAN&gt; // See &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fmesonet.agron.iastate.edu%2Fogc%2F" rel="nofollow" target="_blank"&gt;http://mesonet.agron.iastate.edu/ogc/&lt;/A&gt;&lt;SPAN&gt; for more WMS services from Iowa Environmental Mesonet (Iowa State University)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; url: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmesonet.agron.iastate.edu%2Fcgi-bin%2Fwms%2Fgoes%2Fconus_ir.cgi" rel="nofollow" target="_blank"&gt;https://mesonet.agron.iastate.edu/cgi-bin/wms/goes/conus_ir.cgi&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;map = new Map({&lt;BR /&gt; //basemap: "dark-gray",&lt;BR /&gt; layers: [layer]&lt;BR /&gt; });&lt;BR /&gt; view = new MapView({&lt;BR /&gt; container: "viewDiv",&lt;BR /&gt; //center: [-123, 49],&lt;BR /&gt; //zoom: 5,&lt;BR /&gt; map: map&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My code is smilar but it is typescript:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1- I am using for CORS:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="font-weight: normal;"&gt;esriConfig.request.corsEnabledServers.push(&lt;/SPAN&gt;&lt;BR style="font-weight: normal;" /&gt;&lt;SPAN style="font-weight: normal;"&gt;"mesonet.agron.iastate.edu");&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;or:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;urlUtils.addProxyRule({&lt;BR /&gt;&lt;SPAN&gt; urlPrefix: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmesonet.agron.iastate.edu" rel="nofollow" target="_blank"&gt;https://mesonet.agron.iastate.edu&lt;/A&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt; proxyUrl: "/proxy"&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and rest of the code:&lt;/STRONG&gt;&lt;BR /&gt; var wmsLayer: any = new WMSLayer();&lt;BR /&gt;&lt;SPAN&gt; wmsLayer.url = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fmesonet.agron.iastate.edu%2Fcgi-bin%2Fwms%2Fgoes%2Fconus_ir.cgi" rel="nofollow" target="_blank"&gt;https://mesonet.agron.iastate.edu/cgi-bin/wms/goes/conus_ir.cgi&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;this.mapManagerService.map.add(wmsLayer);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by the way I cant reach WMSLayer "url" property so I define it "any" type (Arcgis js Api: 4.4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2017 13:26:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-read-property-on-of-null-at-object-set/m-p/761021#M70534</guid>
      <dc:creator>selcukcelik</dc:creator>
      <dc:date>2017-08-04T13:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot read property 'on' of null     at Object.set (ExportWMSImageParameters.js:5)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-read-property-on-of-null-at-object-set/m-p/761022#M70535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like a bug in the typings that will be fixed at the next release. &amp;nbsp;To workaround the issue for now you can update the index.d.ts file to add url to the WMSLayerProperties.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp; &lt;SPAN class="keyword token"&gt;interface&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;WMSLayerProperties&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;extends&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;LayerProperties&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; PortalLayerProperties &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; copyright&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; string&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; customLayerParameters&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; any&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; customParameters&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; any&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; description&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; string&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; featureInfoFormat&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; string&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; featureInfoUrl&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; string&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fullExtents&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; ExtentProperties&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; imageFormat&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; string&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; imageMaxHeight&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; number&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; imageMaxWidth&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; number&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; imageTransparency&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; boolean&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; spatialReference&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; SpatialReferenceProperties&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; spatialReferences&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; number&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; sublayers&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; Collection &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; any&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; version&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; string&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; url&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; string&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added a TypeScript WMSLayer sample here that updates the WMSLayerProperties interface in app/updates.d.ts.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/kellyhutchins/TSSamples_JSAPI/tree/master/WMSLayer" title="https://github.com/kellyhutchins/TSSamples_JSAPI/tree/master/WMSLayer" rel="nofollow noopener noreferrer" target="_blank"&gt;TSSamples_JSAPI/WMSLayer at master · kellyhutchins/TSSamples_JSAPI · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:20:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-read-property-on-of-null-at-object-set/m-p/761022#M70535</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2021-12-12T08:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot read property 'on' of null     at Object.set (ExportWMSImageParameters.js:5)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-read-property-on-of-null-at-object-set/m-p/761023#M70536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;still a bug in 4.5?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2017 12:35:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-read-property-on-of-null-at-object-set/m-p/761023#M70536</guid>
      <dc:creator>baskentedas</dc:creator>
      <dc:date>2017-10-06T12:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot read property 'on' of null     at Object.set (ExportWMSImageParameters.js:5)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-read-property-on-of-null-at-object-set/m-p/761024#M70537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue is resolved in 4.5. I just tested with the sample and it works just fine without the uopdates.d.ts file included.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Oct 2017 16:28:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-read-property-on-of-null-at-object-set/m-p/761024#M70537</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2017-10-06T16:28:40Z</dc:date>
    </item>
  </channel>
</rss>

