<?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: layer.load  === false when it should be true? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607469#M56818</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Laura,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Actually getting an error on this url specifically the info portion is totally normal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://[private" rel="nofollow" target="_blank"&gt;http://[private&lt;/A&gt;&lt;SPAN&gt; server]/arcgis/rest/info?f=json" this is how the API tests if the server supports CORS or not.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Jun 2015 20:30:32 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2015-06-26T20:30:32Z</dc:date>
    <item>
      <title>layer.load  === false when it should be true?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607465#M56814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have one secured layer in my map. Every time I run the map from NetBeans, there is a 401 (Unauthorized) error logging in the console for this secured service. Despite this, the layer is visible and useable on the map (identify, query work fine, geometry shows up fine). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure what's causing the 401 error - I have myself set up to have access to this service, so that shouldn't be an issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For those users who should not have access, I need to gray out the item in the layer menu where they would turn the layer on and off, and deactivate its checkbox. This works fine, and I have it set to do this if layer.loaded === false. Problem is, it always === false, even though it loads and is viewable. Anybody have an idea why this might be?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 18:48:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607465#M56814</guid>
      <dc:creator>LauraMiles1</dc:creator>
      <dc:date>2015-06-26T18:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: layer.load  === false when it should be true?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607466#M56815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Laura,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Can you share some code and the error you are receiving?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 18:55:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607466#M56815</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-06-26T18:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: layer.load  === false when it should be true?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607467#M56816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert, I posted to &lt;A href="https://jsfiddle.net/maj5pkjp/3/"&gt;jsfiddle&lt;/A&gt; but it's not functional - I got errors adding my external resources because some of them are http and not https? You wouldn't be able to see my map layers anyways as they are on our intranet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The test for layer.loaded is in the function mapLoad, near the bottom of the js code. Switching out for our non-secured layer (layerCadastral) this works as intended - so if I put an error in the path for layerCadastral, loaded = false and if I leave the correct url, loaded = true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just can't figure out why I would be getting a security error, while the layer seems to load fine and is totally accessible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically, this is what comes up in the NetBeans console:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Failed to load resource: the server responded with a status of 401 (Unauthorized) (13:05:43:872 | error, network)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://[private" rel="nofollow" target="_blank"&gt;http://[private&lt;/A&gt;&lt;SPAN&gt; server]/arcgis/rest/info?f=json&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;XMLHttpRequest cannot load &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://[private" rel="nofollow" target="_blank"&gt;http://[private&lt;/A&gt;&lt;SPAN&gt; server]/arcgis/rest/info?f=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://localhost:8383" rel="nofollow" target="_blank"&gt;http://localhost:8383&lt;/A&gt;&lt;SPAN&gt;' is therefore not allowed access. The response had HTTP status code 401. (13:05:43:873 | error, javascript)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; at public_html/MOR.html&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 20:24:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607467#M56816</guid>
      <dc:creator>LauraMiles1</dc:creator>
      <dc:date>2015-06-26T20:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: layer.load  === false when it should be true?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607468#M56817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I should also add, I was told I would have to use a proxy to avoid users having a sign-in dialog pop up for the secured layer. However we found that users are not getting the sign-in dialog - they are able to view this secured layer based on their permissions configured in Server Manager. From what I understand, this should not be possible, but it is working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 20:30:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607468#M56817</guid>
      <dc:creator>LauraMiles1</dc:creator>
      <dc:date>2015-06-26T20:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: layer.load  === false when it should be true?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607469#M56818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Laura,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Actually getting an error on this url specifically the info portion is totally normal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://[private" rel="nofollow" target="_blank"&gt;http://[private&lt;/A&gt;&lt;SPAN&gt; server]/arcgis/rest/info?f=json" this is how the API tests if the server supports CORS or not.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 20:30:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607469#M56818</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-06-26T20:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: layer.load  === false when it should be true?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607470#M56819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not really very familiar with CORS...you are saying this is a more generic error that doesn't relate to my secured layer? Sounds like something I can disregard then?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you see any reason layerEnviroSIDRelate.loaded is always false, even though the layer appears on the map? I may ask ESRI tech support about that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 20:37:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607470#M56819</guid>
      <dc:creator>LauraMiles1</dc:creator>
      <dc:date>2015-06-26T20:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: layer.load  === false when it should be true?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607471#M56820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Laura,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Yes you can ignore the CORS check error. I will look at your fiddle and see if anything stands out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 20:40:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607471#M56820</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-06-26T20:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: layer.load  === false when it should be true?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607472#M56821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Much appreciated, thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 20:45:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607472#M56821</guid>
      <dc:creator>LauraMiles1</dc:creator>
      <dc:date>2015-06-26T20:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: layer.load  === false when it should be true?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607473#M56822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the map.load event where you are checking for the layerCadastal.loaded === false is being called before the layer has been loaded check for the value in the event "layers-add-result" and see if it is still not loaded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 21:12:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607473#M56822</guid>
      <dc:creator>thejuskambi</dc:creator>
      <dc:date>2015-06-26T21:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: layer.load  === false when it should be true?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607474#M56823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thejus, thank you that seems to be correct. Changed it to run on the "layers-add-result" event and it works perfectly!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 22:39:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607474#M56823</guid>
      <dc:creator>LauraMiles1</dc:creator>
      <dc:date>2015-06-26T22:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: layer.load  === false when it should be true?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607475#M56824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use a chrome plugin to remove CORS error.&lt;/P&gt;&lt;P&gt;&lt;A href="http://pointdeveloper.com/how-to-bypass-cors-errors-on-chrome-and-firefox-for-testing/"&gt;http://pointdeveloper.com/how-to-bypass-cors-errors-on-chrome-and-firefox-for-testing/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just Download the plugin from the link above hope this might help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 18:37:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-load-false-when-it-should-be-true/m-p/607475#M56824</guid>
      <dc:creator>DeepakBegrajka1</dc:creator>
      <dc:date>2017-07-12T18:37:18Z</dc:date>
    </item>
  </channel>
</rss>

