<?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: Private shared webmap is not working in ReactJS App. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/private-shared-webmap-is-not-working-in-reactjs/m-p/1486963#M84817</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384" target="_self"&gt;&lt;SPAN class=""&gt;ReneRubalcava,&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response; it helped me achieve authentication without a login popup.&lt;/P&gt;&lt;P&gt;----&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; ----&lt;/P&gt;&lt;P&gt;I have another feature scenario that I want to implement, but I'm not sure how to proceed. Could you please take a look and share your thoughts ?&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-a-onclick-event-on-cluster-image/m-p/1476230" target="_self"&gt;How to add a onClick event on cluster image ?&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jun 2024 06:18:34 GMT</pubDate>
    <dc:creator>TapanPatra1</dc:creator>
    <dc:date>2024-06-07T06:18:34Z</dc:date>
    <item>
      <title>Private shared webmap is not working in ReactJS App.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/private-shared-webmap-is-not-working-in-reactjs/m-p/1476943#M84686</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am using npm&amp;nbsp;&lt;SPAN&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/642472"&gt;@ArcGIS&lt;/a&gt;/core and version&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;is&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;4.27.6 in my ReactJs Application (version 18).&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;I have an Esri developer account and created a webmap. I use the webmap id to display it in my React app.&lt;BR /&gt;If I publish the webmap as public, it works well in my react app, but, &lt;STRONG&gt;if I publish it as private (Owner) then not working.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-un-associations/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/sample-code/widgets-un-associations/&lt;/A&gt;&lt;BR /&gt;The above URL is a sample code by Esri, and the ID is private; it always asks for the username and password popup to access the items. When I use the Esri sample code ID in my ReactJs app, it asking me for a user id and password to login, if I provide the correct credentials then map elements appear correctly. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;However, my developer account's private sharing webmap is not working in ReactJS app. Public Shared webmap id is working. &lt;/STRONG&gt;(Plain html, css and javascript code also working)&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sharing here my ReactJS code, and &lt;STRONG&gt;please help me how to display my private webmap in my ReactJS app without login popup.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import React, { useEffect, useRef, useState } from "react";
import MapView from "@arcgis/core/views/MapView";
import MyMap from "@arcgis/core/WebMap";
import esriConfig from "@arcgis/core/config";
import "./map/Map.css";

function App() {
  const theMap = useRef(null);
  esriConfig.apiKey = "AAPK631c4105f38a407da4ee98fd2ea6a6a5xDYahTe5h9KOpsaHw4JfGhURXrMOgs_iq-a0V9Tn_CwjvL94Q8m87Y9CmivczPv8";

  useEffect(() =&amp;gt; {
    const view = new MapView({
      map: new MyMap({
        basemap: 'arcgis-oceans',
        portalItem: {
          //id: "471eb0bf37074b1fbb972b1da70fb310"  // a private map id by esri sample code.
          id: "9d9dea828acb4e65aa95baa03f0e1270"  // private map id by me.
        },
      }),
      container: theMap.current,
    });
  }, []);

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;Esri JS SDK Maps&amp;lt;/h1&amp;gt;
      &amp;lt;div className="theMap" ref={theMap}&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}



export default App;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are my private webmap&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-05-22 at 7.41.29 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104944i57A41FBC3CD0A05F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-05-22 at 7.41.29 PM.png" alt="Screenshot 2024-05-22 at 7.41.29 PM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-05-22 at 7.45.21 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104945i205AD0E36B9A730F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2024-05-22 at 7.45.21 PM.png" alt="Screenshot 2024-05-22 at 7.45.21 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 14:19:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/private-shared-webmap-is-not-working-in-reactjs/m-p/1476943#M84686</guid>
      <dc:creator>TapanPatra1</dc:creator>
      <dc:date>2024-05-22T14:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Private shared webmap is not working in ReactJS App.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/private-shared-webmap-is-not-working-in-reactjs/m-p/1477045#M84687</link>
      <description>&lt;P&gt;You will need to add some authentication to your application. In the documentation there is a section in the table of contents you can refer to.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ReneRubalcava_0-1716393209134.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104966i39015B6A26A7CC31/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ReneRubalcava_0-1716393209134.png" alt="ReneRubalcava_0-1716393209134.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The links in that dropdown&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ArcGIS Org Portals -&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/arcgis-organization-portals/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/arcgis-organization-portals/&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Access Secure Resources -&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/secure-resources/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/secure-resources/&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Tutorial -&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/tutorials/implement-user-authentication/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/tutorials/implement-user-authentication/&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Sample -&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/identity-oauth-basic/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/identity-oauth-basic/&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 22 May 2024 15:56:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/private-shared-webmap-is-not-working-in-reactjs/m-p/1477045#M84687</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2024-05-22T15:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Private shared webmap is not working in ReactJS App.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/private-shared-webmap-is-not-working-in-reactjs/m-p/1486963#M84817</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384" target="_self"&gt;&lt;SPAN class=""&gt;ReneRubalcava,&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response; it helped me achieve authentication without a login popup.&lt;/P&gt;&lt;P&gt;----&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; ----&lt;/P&gt;&lt;P&gt;I have another feature scenario that I want to implement, but I'm not sure how to proceed. Could you please take a look and share your thoughts ?&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-a-onclick-event-on-cluster-image/m-p/1476230" target="_self"&gt;How to add a onClick event on cluster image ?&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 06:18:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/private-shared-webmap-is-not-working-in-reactjs/m-p/1486963#M84817</guid>
      <dc:creator>TapanPatra1</dc:creator>
      <dc:date>2024-06-07T06:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Private shared webmap is not working in ReactJS App.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/private-shared-webmap-is-not-working-in-reactjs/m-p/1518814#M85319</link>
      <description>&lt;P&gt;Hi, can I know how method do you&amp;nbsp;&lt;SPAN&gt;achieve authentication without a login popup&lt;/SPAN&gt;?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 07:39:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/private-shared-webmap-is-not-working-in-reactjs/m-p/1518814#M85319</guid>
      <dc:creator>mazlianamohd_nordin</dc:creator>
      <dc:date>2024-08-13T07:39:18Z</dc:date>
    </item>
  </channel>
</rss>

