<?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: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request and it seems queryGeometries parameter is now set to false) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428205#M39375</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christophe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The performance work that was done removed some unnecessary geometry queries on the popup. Unfortunately, what worked in the past now needs to be slightly updated to get the geometries like before. In the prior samples, the geometry was included in either the layer or the popup's template. In&amp;nbsp;your specific case, the layer&lt;/SPAN&gt;&amp;nbsp;isn't queried&amp;nbsp;for geometries in order to draw features and the popup does not need to query for geometries because it&amp;nbsp;does not&amp;nbsp;need the geometry for anything within the popup, i.e. Arcade expressions. We won't query for the geometries unless they are needed such as in your application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a snippet showing how to do this in your example,&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/hgonzago/pen/bGepYKW?editors=1000" title="https://codepen.io/hgonzago/pen/bGepYKW?editors=1000"&gt;https://codepen.io/hgonzago/pen/bGepYKW?editors=1000&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;view.when(function () {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; webmap.when(function(response){&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; returnedLayer = response.layers.find(function(layer){&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;return layer.id === "SITG_OPENDATA_01_2709";&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; });&lt;/EM&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; if (returnedLayer.popupTemplate.outFields == null ) {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // set the outFields on the template&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; returnedLayer.popupTemplate.outFields = ["*"];&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; }&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; //Now you have to wait for the&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;viewModel&lt;/EM&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to be active&lt;/SPAN&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; view.watch("popup.viewModel.active", function(){&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(view.popup.selectedFeature.geometry.type);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; });&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; });&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; });&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am definitely going to include this in our documentation to help avoid this confusion for any others later down the line. Thank you for questions and samples. //&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Oct 2020 20:43:21 GMT</pubDate>
    <dc:creator>HeatherGonzago</dc:creator>
    <dc:date>2020-10-16T20:43:21Z</dc:date>
    <item>
      <title>Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request and it seems queryGeometries parameter is now set to false)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428196#M39366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did. I looked at the request and it seems queryGeometries parameter is now set to false, but not for all layers.&lt;/P&gt;&lt;P&gt;This is quite a big problem since measuring from popup actions is not possible anymore.&lt;/P&gt;&lt;P&gt;Did anyone see the same behavior ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Oct 2020 16:45:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428196#M39366</guid>
      <dc:creator>ChristopheSuter</dc:creator>
      <dc:date>2020-10-09T16:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request and it seems queryGeometries parameter is now set to false)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428197#M39367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christophe, can you please provide a test-app that reproduces the issue you are seeing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Oct 2020 17:09:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428197#M39367</guid>
      <dc:creator>AnneFitz</dc:creator>
      <dc:date>2020-10-12T17:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request and it seems queryGeometries parameter is now set to false)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428198#M39368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, we did do some work with help with querying and performance issues but this should not pertain to this issue at all.&amp;nbsp;&amp;nbsp;The geometry should be there already unless it's not querying for geometries on the layer. Could you please provide a test app showing the issue you are experiencing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2020 20:26:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428198#M39368</guid>
      <dc:creator>HeatherGonzago</dc:creator>
      <dc:date>2020-10-15T20:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request and it seems queryGeometries parameter is now set to false)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428199#M39369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I played around with some of our samples and cannot see this issue, for example,&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/index.html"&gt;Popup actions | ArcGIS API for JavaScript 4.17&lt;/A&gt;&amp;nbsp; is able to successfully access the selected feature's geometry and performs a measurement without an issues. We'll definitely need to see your app to figure out the issue at hand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Oct 2020 21:16:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428199#M39369</guid>
      <dc:creator>HeatherGonzago</dc:creator>
      <dc:date>2020-10-15T21:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request and it seems queryGeometries parameter is now set to false)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428200#M39370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Heather,&lt;/P&gt;&lt;P&gt;I found where the problem is, if you do not specify outFields=['*'] when creating the featureLayer, then no geometry is returned on popup selected Feature.&lt;/P&gt;&lt;P&gt;Here are 2 samples:&lt;/P&gt;&lt;P&gt;&lt;A class="" href="https://www.topomat.ch/demo/popupFeature/working.html" title="https://www.topomat.ch/demo/popupFeature/working.html"&gt;Popup feature returns geometry&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.topomat.ch/demo/popupFeature/not_working.html" title="https://www.topomat.ch/demo/popupFeature/not_working.html"&gt;Popup feature does not return geometry&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.topomat.ch/demo/popupFeature/working.html" title="https://www.topomat.ch/demo/popupFeature/working.html"&gt;https://www.topomat.ch/demo/popupFeature/working.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is still a problem when layers are not created in the code, but published in a webMap ...&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Christophe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2020 07:02:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428200#M39370</guid>
      <dc:creator>ChristopheSuter</dc:creator>
      <dc:date>2020-10-16T07:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request and it seems queryGeometries parameter is now set to false)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428201#M39371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Heather,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found where the problem is, if you do not specify outFields=['*'] when creating the featureLayer, then no geometry is returned on popup selected Feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are 2 samples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;https://www.topomat.ch/demo/popupFeature/working.html&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;https://www.topomat.ch/demo/popupFeature/not_working.html&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is still a problem when layers are not created in the code, but published in a webMap ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christophe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2020 07:30:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428201#M39371</guid>
      <dc:creator>ChristopheSuter</dc:creator>
      <dc:date>2020-10-16T07:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request and it seems queryGeometries parameter is now set to false)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428202#M39372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Christophe, this should definitely not be happening. Let me look at this and see what may be going on. I appreciate your quick response with info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-heather&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2020 12:37:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428202#M39372</guid>
      <dc:creator>HeatherGonzago</dc:creator>
      <dc:date>2020-10-16T12:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request and it seems queryGeometries parameter is now set to false)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428203#M39373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, this isn't a bug. The problem is because you need to make sure you specify the &lt;EM&gt;PopupTemplate's outfields&lt;/EM&gt; as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I updated the non-working sample to include this and the geometry returns correctly now, see&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/hgonzago/pen/ExyKZqB?editors=1000" title="https://codepen.io/hgonzago/pen/ExyKZqB?editors=1000"&gt;https://codepen.io/hgonzago/pen/ExyKZqB?editors=1000&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There were some updates made at 4.17 to help with performance issues so this is probably why you see this problem. Prior to this though, we always recommend setting the &lt;EM&gt;outFields&lt;/EM&gt; in the PopupTemplate. Going forward, if you wish to access the returned geometry like this, you must make sure that this is included.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We do discuss this in documentation, but I think we can probably make this easier to find and understand. I will make sure to include some additional information in our next doc update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Heather&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2020 13:50:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428203#M39373</guid>
      <dc:creator>HeatherGonzago</dc:creator>
      <dc:date>2020-10-16T13:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request and it seems queryGeometries parameter is now set to false)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428204#M39374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok thanks Heather, but what is the solution if that same layer is defined in a webmap:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;… new sample&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;https://www.topomat.ch/demo/popupFeature/webmap_not_working.html&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2020 16:00:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428204#M39374</guid>
      <dc:creator>ChristopheSuter</dc:creator>
      <dc:date>2020-10-16T16:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request and it seems queryGeometries parameter is now set to false)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428205#M39375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christophe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The performance work that was done removed some unnecessary geometry queries on the popup. Unfortunately, what worked in the past now needs to be slightly updated to get the geometries like before. In the prior samples, the geometry was included in either the layer or the popup's template. In&amp;nbsp;your specific case, the layer&lt;/SPAN&gt;&amp;nbsp;isn't queried&amp;nbsp;for geometries in order to draw features and the popup does not need to query for geometries because it&amp;nbsp;does not&amp;nbsp;need the geometry for anything within the popup, i.e. Arcade expressions. We won't query for the geometries unless they are needed such as in your application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a snippet showing how to do this in your example,&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/hgonzago/pen/bGepYKW?editors=1000" title="https://codepen.io/hgonzago/pen/bGepYKW?editors=1000"&gt;https://codepen.io/hgonzago/pen/bGepYKW?editors=1000&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;view.when(function () {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; webmap.when(function(response){&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; returnedLayer = response.layers.find(function(layer){&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;return layer.id === "SITG_OPENDATA_01_2709";&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; });&lt;/EM&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; if (returnedLayer.popupTemplate.outFields == null ) {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // set the outFields on the template&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; returnedLayer.popupTemplate.outFields = ["*"];&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; }&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; //Now you have to wait for the&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;viewModel&lt;/EM&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to be active&lt;/SPAN&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; view.watch("popup.viewModel.active", function(){&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(view.popup.selectedFeature.geometry.type);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; });&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; });&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; });&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am definitely going to include this in our documentation to help avoid this confusion for any others later down the line. Thank you for questions and samples. //&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2020 20:43:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428205#M39375</guid>
      <dc:creator>HeatherGonzago</dc:creator>
      <dc:date>2020-10-16T20:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request and it seems queryGeometries parameter is now set to false)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428206#M39376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Heather,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for that, but this looks a bit more like a workaround for me, I agree performances improvements at 4.17 are remarkable, but it is a little difficult to link outfields of popup template with geometry. As in query, a Boolean “returnGeometry” property would be easier to use (and to understand) at 4.17+.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But thanks for the time you spent on that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Oct 2020 07:15:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428206#M39376</guid>
      <dc:creator>ChristopheSuter</dc:creator>
      <dc:date>2020-10-17T07:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request and it seems queryGeometries parameter is now set to false)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428207#M39377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christophe,&lt;/P&gt;&lt;P&gt;Thanks for your help and suggestion. We will take a look at this and see if there is any way we could make this easier to implement for our developers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Heather&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2020 16:08:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/428207#M39377</guid>
      <dc:creator>HeatherGonzago</dc:creator>
      <dc:date>2020-10-19T16:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request an</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/1082996#M74024</link>
      <description>&lt;P&gt;Hi Heather,&lt;/P&gt;&lt;P&gt;We still have the same problem in 4.20 API when we are using hosted feature layer with webmap. I tried updating the code as below:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.when(function () {
  webmap.when(function(response){
    returnedLayer = response.layers.find(function(layer){
     return layer.id === "SITG_OPENDATA_01_2709";
    });
    if (returnedLayer.popupTemplate.outFields == null ) {
      // set the outFields on the template
      returnedLayer.popupTemplate.outFields = ["*"];
      returnedLayer.popupTemplate.returnGeometry = true;
    }
    //Now you have to wait for the viewModel to be active
    view.watch("popup.viewModel.active", function(){
      console.log(view.popup.selectedFeature.geometry.type);
    });
  });
});&lt;/LI-CODE&gt;&lt;P&gt;by setting the popup template return geometry true,&amp;nbsp; still it is not returning the geometry. I verified in the network logs, the query is overwriting the return geometry to false.&lt;/P&gt;&lt;P&gt;Any suggestions or work around?&lt;/P&gt;&lt;P&gt;Kishore&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 11:24:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/1082996#M74024</guid>
      <dc:creator>Kishore</dc:creator>
      <dc:date>2021-07-27T11:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request an</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/1083082#M74029</link>
      <description>&lt;P&gt;As you've noted above some layer properties are loaded async, so I like to wait for a layer to be loaded before I try to update the properties.&amp;nbsp; If this doesn't solve it then maybe you have a different problem from the original issue so starting a new question might help, and having a codepen (or similar) so we can experience the issue would be helpful.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.when(()=&amp;gt;{
  returnedLayer = view.map.layers.find((layer)=&amp;gt;{
    return layer.id === "SITG_OPENDATA_01_2709";
  });
  returnedLayer.load().then(()=&amp;gt;{
    if (returnedLayer.popupTemplate.outFields == null ) {
      // set the outFields on the template
      returnedLayer.popupTemplate.outFields = ["*"];
      returnedLayer.popupTemplate.returnGeometry = true;
    }
  });
  
  //Now you have to wait for the viewModel to be active
  view.watch("popup.viewModel.active",()=&amp;gt;{
    console.log(view.popup.selectedFeature.geometry.type);
  });
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 15:08:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/1083082#M74029</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2021-07-27T15:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request an</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/1084837#M74092</link>
      <description>&lt;P&gt;Thank you John,&lt;/P&gt;&lt;P&gt;I found the issue. it is related to my environment and data. your code changes are helpful.&lt;/P&gt;&lt;P&gt;Kishore&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 10:40:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/1084837#M74092</guid>
      <dc:creator>Kishore</dc:creator>
      <dc:date>2021-08-02T10:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request an</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/1205815#M78415</link>
      <description>&lt;P&gt;This is still not working for me on the webmap that has layers saved on it. I get geometry as null, and I really do not wish to query the feature from layer just to get it's geometry.&amp;nbsp; Any ideas on how to resolve this ?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;layer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;load&lt;/SPAN&gt;&lt;SPAN&gt;().&lt;/SPAN&gt;&lt;SPAN&gt;then&lt;/SPAN&gt;&lt;SPAN&gt;(() &lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;template&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt; &lt;SPAN&gt;PopupTemplate&lt;/SPAN&gt;&lt;SPAN&gt;({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;returnGeometry&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;outFields&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; [&lt;/SPAN&gt;&lt;SPAN&gt;"*"&lt;/SPAN&gt;&lt;SPAN&gt;],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;title&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;setTitleName&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;content&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; [&lt;/SPAN&gt;&lt;SPAN&gt;contentPromise&lt;/SPAN&gt;&lt;SPAN&gt;],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;actions&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; [],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;template&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;overwriteActions&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;template&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;actions&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;add&lt;/SPAN&gt;&lt;SPAN&gt;(addToSelection&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;template&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;actions&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;add&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;zoomTo&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;template&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;actions&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;add&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;panTo&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;layer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;defaultPopupTemplate&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;returnGeometry&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;layer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;popupTemplate&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;template&lt;/SPAN&gt;&lt;SPAN&gt;;}&lt;BR /&gt;&lt;BR /&gt;mapView.popup.watch("selectedFeature", (ftr) =&amp;gt; {&lt;BR /&gt;// ftr geometry is null&lt;BR /&gt;});&lt;BR /&gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 24 Aug 2022 13:52:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/1205815#M78415</guid>
      <dc:creator>ZaidOdeh</dc:creator>
      <dc:date>2022-08-24T13:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request an</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/1210600#M78622</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/486727"&gt;@ZaidOdeh&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;&lt;P&gt;I am not seeing the issue you mention above when testing. Could provide a codepen showing the issue?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 23:07:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/1210600#M78622</guid>
      <dc:creator>LaurenBoyd</dc:creator>
      <dc:date>2022-09-07T23:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, I'm using ArcGIS Javascript API 4.17 and it seems view.popup.selectedFeature does not return geometry where 4.16 did (looked at the request an</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/1210736#M78633</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/400217"&gt;@LaurenBoyd&lt;/a&gt;. I am using the Javascript API 4.23.7.&amp;nbsp;&lt;BR /&gt;I am unable to share a code pen code because the web map and services are private on a local host, so there is no way for me to share them with you.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 12:56:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hi-i-m-using-arcgis-javascript-api-4-17-and-it/m-p/1210736#M78633</guid>
      <dc:creator>ZaidOdeh</dc:creator>
      <dc:date>2022-09-08T12:56:22Z</dc:date>
    </item>
  </channel>
</rss>

