<?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 Multiple Portal Usage in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-portal-usage/m-p/665997#M62217</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is there a way to load a portal item from 2 different portals to a map?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example (pseudo code),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;esriConfig.portalUrl = &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2FmyHostName.esri.com%2Farcgis" rel="nofollow" target="_blank"&gt;https://myHostName.esri.com/arcgis&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;//create portal item&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;map.add(portalitemlayer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;esriConfig.portalUrl = &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2FmyHostName2.esri.com%2Farcgis" rel="nofollow" target="_blank"&gt;https://myHostName2.esri.com/arcgis&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp; //create portal item&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&amp;nbsp; map.add(portalitemlayer2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;will i be able to use both layers on the map or will the first item be severed because the portalUrl has changed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Or can i do&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;portal = new Portal({ url:&amp;nbsp;&lt;SPAN style="color: #c41a16;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2FmyHostName.esri.com%2Farcgis" rel="nofollow" target="_blank"&gt;https://myHostName.esri.com/arcgis&lt;/A&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;})&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #808080;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #c41a16;"&gt;&lt;SPAN style="color: #808080;"&gt;portal2 = new Portal(&lt;/SPAN&gt;{ url:&amp;nbsp;&lt;SPAN style="color: #c41a16;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2FmyHostName2.esri.com%2Farcgis" rel="nofollow" target="_blank"&gt;https://myHostName2.esri.com/arcgis&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; })&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #333333;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #333333;"&gt;and somehow do something like&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #333333;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #333333;"&gt;map.add(portal.portalitemlayer)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #333333;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #333333;"&gt;map.add(portal2.portalitemlayer2)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Aug 2018 09:58:29 GMT</pubDate>
    <dc:creator>JustinCarasick</dc:creator>
    <dc:date>2018-08-24T09:58:29Z</dc:date>
    <item>
      <title>Multiple Portal Usage</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-portal-usage/m-p/665997#M62217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is there a way to load a portal item from 2 different portals to a map?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for example (pseudo code),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;esriConfig.portalUrl = &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2FmyHostName.esri.com%2Farcgis" rel="nofollow" target="_blank"&gt;https://myHostName.esri.com/arcgis&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;//create portal item&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;map.add(portalitemlayer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;esriConfig.portalUrl = &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2FmyHostName2.esri.com%2Farcgis" rel="nofollow" target="_blank"&gt;https://myHostName2.esri.com/arcgis&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #000000;"&gt;&amp;nbsp; //create portal item&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;&amp;nbsp; map.add(portalitemlayer2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;will i be able to use both layers on the map or will the first item be severed because the portalUrl has changed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Or can i do&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;portal = new Portal({ url:&amp;nbsp;&lt;SPAN style="color: #c41a16;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2FmyHostName.esri.com%2Farcgis" rel="nofollow" target="_blank"&gt;https://myHostName.esri.com/arcgis&lt;/A&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;})&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #808080;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #c41a16;"&gt;&lt;SPAN style="color: #808080;"&gt;portal2 = new Portal(&lt;/SPAN&gt;{ url:&amp;nbsp;&lt;SPAN style="color: #c41a16;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2FmyHostName2.esri.com%2Farcgis" rel="nofollow" target="_blank"&gt;https://myHostName2.esri.com/arcgis&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #333333;"&gt; })&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #333333;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #333333;"&gt;and somehow do something like&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #333333;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #333333;"&gt;map.add(portal.portalitemlayer)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #333333;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #333333;"&gt;map.add(portal2.portalitemlayer2)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2018 09:58:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-portal-usage/m-p/665997#M62217</guid>
      <dc:creator>JustinCarasick</dc:creator>
      <dc:date>2018-08-24T09:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Portal Usage</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-portal-usage/m-p/665998#M62218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try Layer.fromPortalItem()&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#fromPortalItem" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-Layer.html#fromPortalItem"&gt;Layer | API Reference | ArcGIS API for JavaScript 4.8&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It takes a PortalItem object, which contains a portal instance.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#portal" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#portal"&gt;PortalItem | API Reference | ArcGIS API for JavaScript 4.8&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might be able to define the Portal url for the item in there.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#url" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#url"&gt;Portal | API Reference | ArcGIS API for JavaScript 4.8&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've never tried that workflow, but I think it might work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would love to hear if it did!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2018 17:31:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/multiple-portal-usage/m-p/665998#M62218</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2018-08-24T17:31:35Z</dc:date>
    </item>
  </channel>
</rss>

