<?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 Issue when displaying a Popup window in the ESRI Map in ArcGIS JavaScript Maps SDK Videos</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-videos/issue-when-displaying-a-popup-window-in-the-esri/m-p/1129374#M19</link>
    <description>&lt;P&gt;Currently, my Esri Map is displaying the locations on the Esri Map as pinpoints after I pass the location details(latitude, longitude, etc..) to the Esri Map.&lt;/P&gt;&lt;P&gt;So, now what I wanted is when a user clicks on a specific pinpoint, I want to show a popup template and display a table containing its Address, longitude, latitude, etc. I want to dynamically iterate through the array of location objects which I already have(locationData) and set popupTemplate title, content, feildInfo, fieldName etc.&lt;/P&gt;&lt;P&gt;Here is what I have done and &lt;A href="https://www.jbbatterygermany.com/" target="_self"&gt;I&lt;/A&gt;'m getting the following console error now.&lt;/P&gt;&lt;PRE&gt;const popUpTemplate = new PopupTemplate({
title: '',
content: locationData.map((d,i)=&amp;gt;(
[
  {
    type:"fields",
    fieldInfos: [
      {
          fieldName: d.address,
          label: "Address"
      },
      {
          fieldName: d.latitude,
          label: "Latitude",
          format: {
              places: 2
          }
      },
      {
          fieldName: d.longitude,
          label: "Longitude",
          format: {
              places: 2
          }
      }
    ]
  },
  new CustomContent({
    outFields: ["*"],
    creator: (event) =&amp;gt; {
        const a = document.createElement("a");
        // a.href = event.graphic.attributes.url;
        a.target = "_blank";
        // a.innerText = event.graphic.attributes.url;
        return a;
    }
 })
 ]
 ))
});



const dataFeedLayer = new FeatureLayer({
 source: horizonData.map((d,i)=&amp;gt;(
  {
      geometry: new Point({
        longitude: d.longitude,
        latitude: d.latitude
      }),
      attributes: {
        ObjectID: i,
        ...d
      }
  }
)),
fields: [
  {
      name: "ObjectID",
      alias: "ObjectID",
      type: "oid"
  },
  {
      name: "name",
      alias: "Name",
      type: "string"
  },
  {
      name: "addrs",
      alias: "addrs",
      type: "string"
  },
  {
      name: "url",
      alias: "url",
      type: "string"
  },
  {
      name: "lat",
      alias: "Latitude",
      type: "double"
  },
  {
      name: "lon",
      alias: "Longitude",
      type: "double"
  }
],
 objectIdField: 'ObjectID',
 geometryType: "point",
 renderer: renderer,
 popupTemplate: popUpTemplate,
});

webmap.add(dataFeedLayer);&lt;/PRE&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;[esri.core.Accessor] Accessor#set Invalid property value, value needs to be one of 'esri.popup.content.MediaContent', 'esri.popup.content.CustomContent', 'esri.popup.content.TextContent', 'esri.popup.content.AttachmentsContent', 'esri.popup.content.FieldsContent', or a plain object that can autocast (having .type = 'media', 'custom', 'text', 'attachments', 'fields')&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Any idea on how to resolve this. Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Dec 2021 09:42:39 GMT</pubDate>
    <dc:creator>UsmanAziz</dc:creator>
    <dc:date>2021-12-29T09:42:39Z</dc:date>
    <item>
      <title>Issue when displaying a Popup window in the ESRI Map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-videos/issue-when-displaying-a-popup-window-in-the-esri/m-p/1129374#M19</link>
      <description>&lt;P&gt;Currently, my Esri Map is displaying the locations on the Esri Map as pinpoints after I pass the location details(latitude, longitude, etc..) to the Esri Map.&lt;/P&gt;&lt;P&gt;So, now what I wanted is when a user clicks on a specific pinpoint, I want to show a popup template and display a table containing its Address, longitude, latitude, etc. I want to dynamically iterate through the array of location objects which I already have(locationData) and set popupTemplate title, content, feildInfo, fieldName etc.&lt;/P&gt;&lt;P&gt;Here is what I have done and &lt;A href="https://www.jbbatterygermany.com/" target="_self"&gt;I&lt;/A&gt;'m getting the following console error now.&lt;/P&gt;&lt;PRE&gt;const popUpTemplate = new PopupTemplate({
title: '',
content: locationData.map((d,i)=&amp;gt;(
[
  {
    type:"fields",
    fieldInfos: [
      {
          fieldName: d.address,
          label: "Address"
      },
      {
          fieldName: d.latitude,
          label: "Latitude",
          format: {
              places: 2
          }
      },
      {
          fieldName: d.longitude,
          label: "Longitude",
          format: {
              places: 2
          }
      }
    ]
  },
  new CustomContent({
    outFields: ["*"],
    creator: (event) =&amp;gt; {
        const a = document.createElement("a");
        // a.href = event.graphic.attributes.url;
        a.target = "_blank";
        // a.innerText = event.graphic.attributes.url;
        return a;
    }
 })
 ]
 ))
});



const dataFeedLayer = new FeatureLayer({
 source: horizonData.map((d,i)=&amp;gt;(
  {
      geometry: new Point({
        longitude: d.longitude,
        latitude: d.latitude
      }),
      attributes: {
        ObjectID: i,
        ...d
      }
  }
)),
fields: [
  {
      name: "ObjectID",
      alias: "ObjectID",
      type: "oid"
  },
  {
      name: "name",
      alias: "Name",
      type: "string"
  },
  {
      name: "addrs",
      alias: "addrs",
      type: "string"
  },
  {
      name: "url",
      alias: "url",
      type: "string"
  },
  {
      name: "lat",
      alias: "Latitude",
      type: "double"
  },
  {
      name: "lon",
      alias: "Longitude",
      type: "double"
  }
],
 objectIdField: 'ObjectID',
 geometryType: "point",
 renderer: renderer,
 popupTemplate: popUpTemplate,
});

webmap.add(dataFeedLayer);&lt;/PRE&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;[esri.core.Accessor] Accessor#set Invalid property value, value needs to be one of 'esri.popup.content.MediaContent', 'esri.popup.content.CustomContent', 'esri.popup.content.TextContent', 'esri.popup.content.AttachmentsContent', 'esri.popup.content.FieldsContent', or a plain object that can autocast (having .type = 'media', 'custom', 'text', 'attachments', 'fields')&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Any idea on how to resolve this. Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 09:42:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-videos/issue-when-displaying-a-popup-window-in-the-esri/m-p/1129374#M19</guid>
      <dc:creator>UsmanAziz</dc:creator>
      <dc:date>2021-12-29T09:42:39Z</dc:date>
    </item>
  </channel>
</rss>

