<?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: WMSLayer Not Working : Failed to load layer/Cannot read property 'indexOf' of undefined in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-not-working-failed-to-load-layer-cannot/m-p/488#M37</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using the same sublayer as the sample in your app or a different sublayer? Currently, I cannot&amp;nbsp;reproduce your error. &lt;SPAN&gt;If you could share a little more information about your app, I might be able to help you figure out the problem.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;Thanks,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Anne&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Dec 2019 21:26:28 GMT</pubDate>
    <dc:creator>AnneFitz</dc:creator>
    <dc:date>2019-12-13T21:26:28Z</dc:date>
    <item>
      <title>WMSLayer Not Working : Failed to load layer/Cannot read property 'indexOf' of undefined</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-not-working-failed-to-load-layer-cannot/m-p/487#M36</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working with JavaScript API 4.12.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried&amp;nbsp;using the url in &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-wms/index.html"&gt;Sample - WMSLayer&lt;/A&gt;&amp;nbsp;which should work fine but instead giving me the error '[esri.layers.WMSLayer] #load() Failed to load layer (title: 'WMS Layer', id: '16ef4567998-layer-4') TypeError: Cannot read property 'indexOf' of undefined'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let wmsLayer = new WMSLayer({&lt;BR /&gt; title: "WMS Layer",&lt;BR /&gt; url: "https://ows.terrestris.de/osm/service",&lt;BR /&gt; sublayers: [&lt;BR /&gt; {&lt;BR /&gt; name: "OSM-WMS"&lt;BR /&gt; }&lt;BR /&gt; ]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thought it was a spatial reference relevant error, I've tried setting 'wmsLayer.spatialReference = 102100;' but still got the same error. After googling WMS url usage, I tried putting the url with the complete parameters and got a 'XML Parse error&lt;SPAN style="color: #c41a16;"&gt;'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let wmsLayer = new WMSLayer({&lt;BR /&gt; title: "WMS Layer",&lt;BR /&gt; url: "https://neo.sci.gsfc.nasa.gov/wms/wms?version=1.3.0&amp;amp;request=GetMap&amp;amp;layers=MOD14A1_M_FIRE&amp;amp;style=rgb&amp;amp;crs=CRS:84&amp;amp;bbox=-180,-90,180,90&amp;amp;width=720&amp;amp;height=360&amp;amp;format=image/png"&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var basemap = new Basemap({&lt;BR /&gt; baseLayers: [wmsLayer]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;var map = new Map({&lt;BR /&gt; basemap: basemap,&lt;BR /&gt; layers: [gridLayer, forceSymbolLayer, measurementLayer, sketchLayer]&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to the GIS development, and really confused about the WMS format to set as the url, especially when the sample from official website doesn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2019 10:04:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-not-working-failed-to-load-layer-cannot/m-p/487#M36</guid>
      <dc:creator>JerryChen</dc:creator>
      <dc:date>2019-12-11T10:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: WMSLayer Not Working : Failed to load layer/Cannot read property 'indexOf' of undefined</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-not-working-failed-to-load-layer-cannot/m-p/488#M37</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using the same sublayer as the sample in your app or a different sublayer? Currently, I cannot&amp;nbsp;reproduce your error. &lt;SPAN&gt;If you could share a little more information about your app, I might be able to help you figure out the problem.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;Thanks,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Anne&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2019 21:26:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/wmslayer-not-working-failed-to-load-layer-cannot/m-p/488#M37</guid>
      <dc:creator>AnneFitz</dc:creator>
      <dc:date>2019-12-13T21:26:28Z</dc:date>
    </item>
  </channel>
</rss>

