<?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: Empty Popup in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-popup/m-p/1501902#M84991</link>
    <description>&lt;P&gt;Thank you so much for replying let me try that&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jul 2024 16:14:37 GMT</pubDate>
    <dc:creator>mnoel2</dc:creator>
    <dc:date>2024-07-05T16:14:37Z</dc:date>
    <item>
      <title>Empty Popup</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-popup/m-p/1498819#M84945</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm trying to populate a popup, but I'm not clear why the popup gets displayed but there is no content. It is not clear if the graphic layer is getting override it and becomes null or undefined. The hosted feature is coming from ArcGIS online, I think there should not be any issue but, you never know. I have attached the files. The steps:&lt;/P&gt;&lt;P&gt;1.Run application locally&lt;/P&gt;&lt;P&gt;2. click on Phoenix feature&lt;/P&gt;&lt;P&gt;3. popup displays without attributes&lt;/P&gt;&lt;P&gt;find&amp;nbsp; repo:&amp;nbsp;&lt;A title="github repo for UFO Web map app" href="https://github.com/mnavidad/UFOSIGHTINGSAPP/tree/master" target="_self"&gt;https://github.com/mnavidad/UFOSIGHTINGSAPP/tree/master&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 03:22:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-popup/m-p/1498819#M84945</guid>
      <dc:creator>mnoel2</dc:creator>
      <dc:date>2024-06-28T03:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Popup</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-popup/m-p/1499199#M84952</link>
      <description>&lt;P&gt;You mostly had it...perhaps if the documentation for using a function with the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content" target="_self"&gt;content&lt;/A&gt; property were more clear on what gets passed to the function, you'd have gotten better results.&amp;nbsp; The following shows the changes you can make to your popupTemplate definition to get it working though:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    const popupTemplate = {
        title: "You clicked here",
		outFields: ["STATE","CITY","DESCRIPTION","DATE_TIME"],
        content: function(feature) {
          const state = feature.graphic.attributes.STATE;
          const city = feature.graphic.attributes.CITY || ""; // Handle missing CITY attribute
          const description = feature.graphic.attributes.DESCRIPTION;
          const dateTime = feature.graphic.attributes.DATE_TIME;
      
           return `
            &amp;lt;div&amp;gt;
              &amp;lt;h3&amp;gt;State: ${state}&amp;lt;/h3&amp;gt;
              ${city ? `&amp;lt;h3&amp;gt;City: ${city}&amp;lt;/h3&amp;gt;` : ''}
              &amp;lt;h3&amp;gt;Description: ${description}&amp;lt;/h3&amp;gt;
              &amp;lt;h3&amp;gt;Date: ${dateTime}&amp;lt;/h3&amp;gt;
            &amp;lt;/div&amp;gt;
          `; 
          
        }
      };&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 28 Jun 2024 17:11:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-popup/m-p/1499199#M84952</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2024-06-28T17:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Empty Popup</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-popup/m-p/1501902#M84991</link>
      <description>&lt;P&gt;Thank you so much for replying let me try that&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2024 16:14:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/empty-popup/m-p/1501902#M84991</guid>
      <dc:creator>mnoel2</dc:creator>
      <dc:date>2024-07-05T16:14:37Z</dc:date>
    </item>
  </channel>
</rss>

