<?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 Popup Async in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-async/m-p/1180369#M77609</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I am looking to run async query methed on map click, and show results in a popup along with other visible features.&amp;nbsp; I am running that query method as below.&lt;/P&gt;&lt;P&gt;Sometimes query results shows up in popup, and sometime doesn't and only the map feature layer results shows up in popup. Not sure how to add a query method before popup renders.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;mapView.on("click",(evt) =&amp;gt; {
    const query_promise = getFeatures(evt.mapPoint,1,"feet",working_region);
    query_promise.then((e:Graphic[]) =&amp;gt;{
        if(e.length){
            mapView.popup.features.push(e[0]);
        }
    });
})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2022 19:03:44 GMT</pubDate>
    <dc:creator>VikKrishna</dc:creator>
    <dc:date>2022-06-06T19:03:44Z</dc:date>
    <item>
      <title>Popup Async</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-async/m-p/1180369#M77609</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I am looking to run async query methed on map click, and show results in a popup along with other visible features.&amp;nbsp; I am running that query method as below.&lt;/P&gt;&lt;P&gt;Sometimes query results shows up in popup, and sometime doesn't and only the map feature layer results shows up in popup. Not sure how to add a query method before popup renders.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;mapView.on("click",(evt) =&amp;gt; {
    const query_promise = getFeatures(evt.mapPoint,1,"feet",working_region);
    query_promise.then((e:Graphic[]) =&amp;gt;{
        if(e.length){
            mapView.popup.features.push(e[0]);
        }
    });
})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 19:03:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-async/m-p/1180369#M77609</guid>
      <dc:creator>VikKrishna</dc:creator>
      <dc:date>2022-06-06T19:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Popup Async</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-async/m-p/1182412#M77662</link>
      <description>&lt;P&gt;You could set the content property of your popup to a function as described here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/popuptemplate-promise/" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/popuptemplate-promise/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 18:17:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/popup-async/m-p/1182412#M77662</guid>
      <dc:creator>RobertMEIER</dc:creator>
      <dc:date>2022-06-13T18:17:34Z</dc:date>
    </item>
  </channel>
</rss>

