<?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: Displaying default pop not working in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1332850#M82332</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/677423"&gt;@JeffreyThompson2&lt;/a&gt;&amp;nbsp; I added a feature layer from sample server 6 and made modifications to the code as suggested however, still having the same issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also checked console however, no errors are shown in console as well.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Sep 2023 11:55:41 GMT</pubDate>
    <dc:creator>wizgis</dc:creator>
    <dc:date>2023-09-27T11:55:41Z</dc:date>
    <item>
      <title>Displaying default pop not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1331394#M82281</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;I am trying to do a simple task in which I would like to view the pop-up of features when clicked on it using&amp;nbsp;ArcGIS Maps SDK for JavaScript. I came across the following link&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/defaultpopuptemplateenabled-not-working-with/td-p/1054565" target="_blank"&gt;https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/defaultpopuptemplateenabled-not-working-with/td-p/1054565&lt;/A&gt;&amp;nbsp;which suggests to add the following line :&amp;nbsp;&lt;SPAN&gt;view&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;popup&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;defaultPopupTemplateEnabled&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, when I am trying to do the same in my code, there are no errors however, when I click on any feature it just gets highlighted and pop-up doesn't open. Am attaching the code here. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The layer on which I am running this code is a hosted feature layer published via Survey123 to ArcGIS Online&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Am not sure if I am missing something here.&lt;/P&gt;&lt;P&gt;Any insights on this would be really helpful.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require(["esri/config", "esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer"], function(esriConfig, Map, MapView, FeatureLayer){
    
    esriConfig.apiKey = ""

    var map = new Map({
        basemap: "arcgis-topographic"
    });

    var view = new MapView({
        map: map,
        center: [77.18108, 28.53337],
        zoom: 15,
        container: "viewDiv"
    })

    view.popup.defaultPopupTemplateEnabled = true;

    const floralayer = new FeatureLayer({
        url: "XXXXXXX",
    });

    map.add(floralayer)
    
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 11:33:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1331394#M82281</guid>
      <dc:creator>wizgis</dc:creator>
      <dc:date>2023-09-22T11:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying default pop not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1331408#M82282</link>
      <description>&lt;P&gt;The latest version of the API (4.27) dramatically changed how popups work, so old Community posts may not be accurate anymore.&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/release-notes/#breaking-changes" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/release-notes/#breaking-changes&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require(["esri/config", "esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer", "esri/widgets/Popup"], function(esriConfig, Map, MapView, FeatureLayer, Popup){
    
    esriConfig.apiKey = ""

    var map = new Map({
        basemap: "arcgis-topographic",
        popup: new Popup({
          defaultPopupTemplateEnabled: true
       })
    });

    var view = new MapView({
        map: map,
        center: [77.18108, 28.53337],
        zoom: 15,
        container: "viewDiv"
    })

    const floralayer = new FeatureLayer({
        url: "XXXXXXX",
    });

    map.add(floralayer)
    
    });&lt;/LI-CODE&gt;&lt;P&gt;These modifications should work for you, but you will not see the initial loading speed improvement of the latest API.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2023 12:21:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1331408#M82282</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2023-09-22T12:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying default pop not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1331862#M82297</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/677423"&gt;@JeffreyThompson2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for sharing your insights I modified the code as suggested by you however, I still don't see any pop-up opening when clicking on the feature and now feature is also not getting highlighted like before.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if I might be missing something here.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 06:13:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1331862#M82297</guid>
      <dc:creator>wizgis</dc:creator>
      <dc:date>2023-09-25T06:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying default pop not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1331922#M82299</link>
      <description>&lt;P&gt;I made a mistake in my previous code. popup is a property of MapView, not Map. Try this.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require(["esri/config", "esri/Map", "esri/views/MapView", "esri/layers/FeatureLayer", "esri/widgets/Popup"], function(esriConfig, Map, MapView, FeatureLayer, Popup){
    
    esriConfig.apiKey = ""

    var map = new Map({
        basemap: "arcgis-topographic"
    });

    var view = new MapView({
        map: map,
        center: [77.18108, 28.53337],
        zoom: 15,
        container: "viewDiv",
        popup: new Popup({
          defaultPopupTemplateEnabled: true
       })
    })

    const floralayer = new FeatureLayer({
        url: "XXXXXXX",
    });

    map.add(floralayer)
    
    });&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 25 Sep 2023 12:29:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1331922#M82299</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2023-09-25T12:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying default pop not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1332299#M82315</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/677423"&gt;@JeffreyThompson2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your prompt response however, even after adding the popup template property in Map View object, no pop-up is displayed when I click on the feature, the feature does get highlighted however, no pop-up box appears. I have made sure that pop-up is enabled for the feature layer.&lt;/P&gt;&lt;P&gt;Am not sure if I am missing something here.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2023 08:50:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1332299#M82315</guid>
      <dc:creator>wizgis</dc:creator>
      <dc:date>2023-09-26T08:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying default pop not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1332377#M82317</link>
      <description>&lt;P&gt;Can you try adding another featureLayer to your map? It would be helpful to see if it is a problem with your map or the layer.&lt;/P&gt;&lt;P&gt;Are there any console errors?&lt;/P&gt;&lt;P&gt;Here are a couple other tricks to try.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    var view = new MapView({
        map: map,
        center: [77.18108, 28.53337],
        zoom: 15,
        container: "viewDiv",
        popup: new Popup({
          defaultPopupTemplateEnabled: true,
          popupEnabled: true
       })
    })&lt;/LI-CODE&gt;&lt;LI-CODE lang="javascript"&gt;    var view = new MapView({
        map: map,
        center: [77.18108, 28.53337],
        zoom: 15,
        container: "viewDiv",
        popup: new Popup(...)
    })&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 26 Sep 2023 12:57:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1332377#M82317</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2023-09-26T12:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying default pop not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1332850#M82332</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/677423"&gt;@JeffreyThompson2&lt;/a&gt;&amp;nbsp; I added a feature layer from sample server 6 and made modifications to the code as suggested however, still having the same issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also checked console however, no errors are shown in console as well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 11:55:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1332850#M82332</guid>
      <dc:creator>wizgis</dc:creator>
      <dc:date>2023-09-27T11:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying default pop not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1333331#M82343</link>
      <description>&lt;P&gt;I'm stumped. Just to confirm you are using 4.27? The solutions above will not work on any lower version.&lt;/P&gt;&lt;P&gt;I assume that the other feature layer did not show a popup as well.&lt;/P&gt;&lt;P&gt;Do you get a popup in the ArcGIS Online map viewer?&lt;/P&gt;&lt;P&gt;Have you tried adding popupEnabled: true to your featureLayer declaration?&lt;/P&gt;&lt;P&gt;You are getting no popup at all, not a popup with only a Zoom To button? The later happens when the popupTemplate is not properly defined.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 13:40:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1333331#M82343</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2023-09-28T13:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying default pop not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1333671#M82350</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/677423"&gt;@JeffreyThompson2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure what happened here but, today when I added the same code in a new file everything started to work and I was able to see the popups after clicking on the feature. A slight modification that I made was adding outFields key when creating feature layer object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe a new file was all that was needed for it to work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your patience and persistence on this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 10:03:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/displaying-default-pop-not-working/m-p/1333671#M82350</guid>
      <dc:creator>wizgis</dc:creator>
      <dc:date>2023-09-29T10:03:05Z</dc:date>
    </item>
  </channel>
</rss>

