<?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 Credential request only when Layer activated. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/credential-request-only-when-layer-activated/m-p/214525#M19865</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Is there anyway to delay the JavaScript credential prompt to display when the layer that requires a login is activated?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a js map and I have multiple layers on it. Only 2 out of the 6 total layers are secured (they are stored on our organization's AGOL account). Like normal, when the map opens, it asks for credentials for AGOL. Is there a way to only have the credential request box display only when the AGOL layers are selected in the Layer list widget?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still pretty new to js, so I apologize. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jan 2016 15:14:56 GMT</pubDate>
    <dc:creator>ChristopherSchreiber</dc:creator>
    <dc:date>2016-01-14T15:14:56Z</dc:date>
    <item>
      <title>Credential request only when Layer activated.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/credential-request-only-when-layer-activated/m-p/214525#M19865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, Is there anyway to delay the JavaScript credential prompt to display when the layer that requires a login is activated?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a js map and I have multiple layers on it. Only 2 out of the 6 total layers are secured (they are stored on our organization's AGOL account). Like normal, when the map opens, it asks for credentials for AGOL. Is there a way to only have the credential request box display only when the AGOL layers are selected in the Layer list widget?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still pretty new to js, so I apologize. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 15:14:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/credential-request-only-when-layer-activated/m-p/214525#M19865</guid>
      <dc:creator>ChristopherSchreiber</dc:creator>
      <dc:date>2016-01-14T15:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Credential request only when Layer activated.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/credential-request-only-when-layer-activated/m-p/214526#M19866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might try creating a different TOC. If you populated your TOC apart from the map you could then control when the layer was added to the map, only prompting the login when a secure service was added. Level of effort would depend on how much you were using the Digit/toc Functionality. If your just toggling visibility on 6 layers, I might roll my own and have it add the layers if not currently present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is probably a cleaver way to get the digit/toc to do that as well. I wonder if you faked out its LayerInfo array, perhaps give it a url that is not secure, then flip it first time pressed to the actual url.&amp;nbsp; ... Some random duck tape thoughts ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[0] unsecureUrl&lt;/P&gt;&lt;P&gt;[1] unsecureUrl(fake) but switched to proper secureUrl when first pressed&lt;/P&gt;&lt;P&gt;[2] unsecureUrl&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 15:35:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/credential-request-only-when-layer-activated/m-p/214526#M19866</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2016-01-14T15:35:51Z</dc:date>
    </item>
  </channel>
</rss>

