<?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: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531690#M49536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for now I have to watch the SceneLayerView's updating and request attributes from the connected FeatureService manually.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I can't think of a better way to do this off the top of my head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you said:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I need to&amp;nbsp;set&amp;nbsp;the SceneLayer's renderer to reflect its attribute changes&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you mean by attribute changes?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Oct 2017 12:45:11 GMT</pubDate>
    <dc:creator>ThomasSolow</dc:creator>
    <dc:date>2017-10-11T12:45:11Z</dc:date>
    <item>
      <title>SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531683#M49529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;FeatureLayerView.queryFeatures() returns&amp;nbsp;all the field values&amp;nbsp;and the geometry, but using SceneLayerView.queryFeatures() I&amp;nbsp;can get&amp;nbsp;only the objectid.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 03:26:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531683#M49529</guid>
      <dc:creator>nie</dc:creator>
      <dc:date>2017-10-10T03:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531684#M49530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you show an example sceneLayer to test this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It may be that, in general, sceneLayers features don't send their attributes to the client.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 12:40:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531684#M49530</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-10-10T12:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531685#M49531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post some code snippet on how you do the query? Posting the service url would also be really helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But some general tips:&lt;/P&gt;&lt;P&gt;- make sure you set `outFields: ["*"]` on the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html#outFields"&gt;query&lt;/A&gt; that you pass into the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryFeatures"&gt;queryFeatures&lt;/A&gt; method.&amp;nbsp;&lt;/P&gt;&lt;P&gt;- you can't get the geometry of a SceneLayer feature from the queryFeatures method, but you can get the 3D extent using &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#queryExtent"&gt;queryExtent&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise check this sample on how to use SceneLayerView queries:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=layers-scenelayerview-query" title="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=layers-scenelayerview-query"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 12:41:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531685#M49531</guid>
      <dc:creator>RalucaNicola1</dc:creator>
      <dc:date>2017-10-10T12:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531686#M49532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I mean the SceneLayerView, not the SceneLayer, so&amp;nbsp;the&amp;nbsp;queryFeatures function only do query at the client side, there's no such a process about sending something, am I right?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 16:43:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531686#M49532</guid>
      <dc:creator>nie</dc:creator>
      <dc:date>2017-10-10T16:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531687#M49533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the code snippet is really simple, I just find the scenelayerview instance from sceneview's allLayerViews property and do the query:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;lyrVw &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;allLayerViews&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;find&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;l&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;l&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;title &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'LayerTitle'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; featureSet &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;await&lt;/SPAN&gt; lyrVw&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;queryFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;featureSet.features has all the loaded features of this scenelayer currently in the scene, but there geometry property is null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As soon as I&amp;nbsp;got your reply, I changed the code and execute the query like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; featureSet &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;await&lt;/SPAN&gt; lyrVw&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;queryFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;outFields&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'*'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this time the&amp;nbsp;&lt;SPAN&gt;featureSet.features have all the field values! I'm confused here because the same code(leaving the queryFeatures's parameter blank) returns the expected result, the only difference is&amp;nbsp;changing the LayerTitle to let the lyrVw equals an instance of FeatureLayerView. Is it a better practice to always set the Query params?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You&amp;nbsp;said&amp;nbsp;I can't get the SceneLayer feature's geometry, is this going to be supported in future?&lt;/P&gt;&lt;P&gt;For now, I want to&amp;nbsp;get the particular feature from query and open the popup, so I&amp;nbsp;did wanted to pass the geometry as parameter to the Popup's open function to set the popup windows's location. I will try calculating the center point from the extent, it should work the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:08:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531687#M49533</guid>
      <dc:creator>nie</dc:creator>
      <dc:date>2021-12-11T23:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531688#M49534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you set outFields to ["*"] I don't think the query is going to be client-side anymore. &amp;nbsp;This may be okay for your use case. &amp;nbsp;You can check in dev tools, but I'd bet that you're firing off a bunch of requests when you do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Scene Layers only fetch the object id field by default. &amp;nbsp;They also fetch any&amp;nbsp;field that is needed in the client for a renderer. &amp;nbsp;There's no easy way to specify which fields should be fetched, although there are probably a number of options for forcing the layer to fetch the attributes you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that, normally, SceneLayerView.queryFeatures() will only return the object id&amp;nbsp;plus whichever fields the layer decided are required by the renderer. &amp;nbsp;The client-side query can't return any fields that weren't fetched to draw the layer to begin with. &amp;nbsp;When you pass in outFields, the layer seems to query the Scene Service rather than doing a client-side query. &amp;nbsp;This is a little confusing: my assumption was that LayerView.queryFeatures() is always client-side. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know a lot about Scene Layer geometries, but I don't think they're like Esri geometries. &amp;nbsp;Scene Services return some binary format that can represent vertices, meshes, pyramids, etc. &amp;nbsp;I'm not sure how to get access to that data or what coordinate system it will be in.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Oct 2017 17:59:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531688#M49534</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-10-10T17:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531689#M49535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've just debugged the code, yes, you're right. When I set&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;outFields to ["*"] several new request appear in the Network panel of Chrome Dev Tools. I didn't noticed that and thought LayerView.queryFeatures() is always client-side.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;You mentioned that there're probably some options for forcing the attributes fetch,&amp;nbsp;is there some similar api to force the SceneLayer to fetch attributes from its linked FeatureLayer/FeatureService?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I need to&amp;nbsp;set&amp;nbsp;the SceneLayer's renderer to reflect its attribute changes, but attributes stored in SceneLayer/SceneService and been used to render never change after the service has been published. I have asked about this (&lt;A _jive_internal="true" href="https://community.esri.com/thread/200313-scenelayer-renderer-wont-update-after-the-linked-featurelayers-attributes-has-been-updated"&gt;here&lt;/A&gt;), for now I have to watch the SceneLayerView's updating and request attributes from the connected FeatureService manually.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2017 02:00:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531689#M49535</guid>
      <dc:creator>nie</dc:creator>
      <dc:date>2017-10-11T02:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531690#M49536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for now I have to watch the SceneLayerView's updating and request attributes from the connected FeatureService manually.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I can't think of a better way to do this off the top of my head.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you said:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I need to&amp;nbsp;set&amp;nbsp;the SceneLayer's renderer to reflect its attribute changes&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you mean by attribute changes?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2017 12:45:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531690#M49536</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-10-11T12:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531691#M49537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example, a scene layer named "buildings" has a field storing the usage info, then&amp;nbsp;those building features are rendered with different color according to the&amp;nbsp;usage&amp;nbsp;field. What was expected is,&amp;nbsp;change the usage field value and the renderer style will automatically refresh to "reflect" the field value change.&lt;/P&gt;&lt;P&gt;Now I can applyEdits to the linked feature layer, but the scene layer's renderer style won't update. That's why I need to manually request attributes from the linked feature layer, and wonder if there're some options to force the API to do this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2017 13:12:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531691#M49537</guid>
      <dc:creator>nie</dc:creator>
      <dc:date>2017-10-11T13:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531692#M49538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I understand now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think there's an easy way&amp;nbsp;to get&amp;nbsp;the API to do this. &amp;nbsp;The way I'd approach this is something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Add scene layer to map.&lt;/P&gt;&lt;P&gt;-Create companion&amp;nbsp;feature layer but don't add it (is this done automatically?).&lt;/P&gt;&lt;P&gt;-Whenever the view is stationary query the featureLayer and keep the resulting features in an array, overwriting the array whenever the extent changes.&lt;/P&gt;&lt;P&gt;-Modify the renderer on the sceneLayer to use the features from the featurelayer instead of the features in the scenelayer, if they exist&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; view&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// companion feature layer&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; featureLayer&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// array to hold features&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; featuresArray &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// sceneLayer&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; sceneLayer&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// watch for when view stops moving&lt;/SPAN&gt;
view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;watch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'stationary'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; isStationary &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;isStationary&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;getFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// update features in view&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;getFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;extent&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; q &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;createQuery&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; q&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; extent&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; q&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;outFields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'*'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;queryFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;q&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;then&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featureSet &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; featuresArray &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; featureSet&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// override the getSymbol method on the renderer&lt;/SPAN&gt;
sceneLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;renderer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getSymbol &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;g&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="comment token"&gt;// objectId of the feature being rendered&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; oid &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; g&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;sceneLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;objectIdField&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="comment token"&gt;// search featureLayer for the same feature&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; feature &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; featuresArray&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;find&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;f &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; f&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;attributes&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;sceneLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;objectIdField&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; oid&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// if we found a feature, use that feature to generate a symbol&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; sceneLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;renderer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;__proto__&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getSymbol&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;call&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sceneLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;renderer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// if we didn't, use the sceneLayer's version to generate a symbol&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; sceneLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;renderer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;__proto__&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getSymbol&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;call&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sceneLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;renderer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; g&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&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;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;/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;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;/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;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;/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;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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have access to a scenelayer that has a companion feature layer so I can't test this, but in general I think it should work. &amp;nbsp;It may not be an improvement over what you have currently though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:08:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531692#M49538</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2021-12-11T23:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531693#M49539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A bit late to the party, but here is some more information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. &amp;amp; 3. yes, the geometry property is `null` because the geometry of a SceneLayer is, like Thomas said, in a binary format. The closest you can get to a readable geometry format is to get its extent, which is a geometry extent:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html"&gt;Extent | API Reference | ArcGIS API for JavaScript 4.5&lt;/A&gt;. You can then calculate the center point to place the popup.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How did you publish the service? Sometimes popup info comes with the service, so you get the popup with all the attributes for free, and you don't need to configure anything. For example &lt;A href="https://codepen.io/ralucanicola/pen/KXeypX?editors=1000#0"&gt;here&lt;/A&gt;. What is your use case? Do you want to trigger showing a popup by other action than clicking on the building?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Getting attributes: the SceneLayer only downloads the objectId and the attributes that it needs for the renderer. If the SceneLayer has a linked FeatureLayer the SceneLayerView query will query the FeatureLayer for attributes directly. If it doesn't have a linked FeatureLayer then the SceneLayerView query will still make a request to the server, but this time to get the attributes stored in the cache of the Scene Service. I know this is a bit confusing as the queries on the LayerView should be client-side. We are working on a guide topic that hopefully will make these workflows more clear. They are different from the FeatureLayerView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And about updating the renderer, yes, unfortunately that can't be done using standard solutions, thanks Thomas for providing that hack...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2017 15:02:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531693#M49539</guid>
      <dc:creator>RalucaNicola1</dc:creator>
      <dc:date>2017-10-11T15:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531694#M49540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The process is similar, the difference is, each time the extent change I set a new renderer for the scene layer. Maybe overriding the getSymbol() is a better way, let me try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply, it really helped me a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 02:44:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531694#M49540</guid>
      <dc:creator>nie</dc:creator>
      <dc:date>2017-10-12T02:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531695#M49541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I published the service from ArcGIS Pro, right click on the layer name and click 'Share As Web Layer'. Then three new service appeared in the&amp;nbsp;REST&amp;nbsp;Service&amp;nbsp;Directory of ArcGIS Server, FeatureServer, MapServer and SceneServer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to open the popup programmatically, so I need to do some query first and prepare the features and location for the Popup. I have tested and successfully opened the popup window by using FeatureLayerView.queryExtent().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for explaining the&amp;nbsp;mechanism to me. Both of you are so kind~&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 03:18:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531695#M49541</guid>
      <dc:creator>nie</dc:creator>
      <dc:date>2017-10-12T03:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: SceneLayerView.queryFeatures() returns only objectID, no other fields, no geometry?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531696#M49542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, in this case I guess queryExtent is the best way to get the location of the popup. Happy to hear that it worked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Oct 2017 09:50:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/scenelayerview-queryfeatures-returns-only-objectid/m-p/531696#M49542</guid>
      <dc:creator>RalucaNicola1</dc:creator>
      <dc:date>2017-10-13T09:50:12Z</dc:date>
    </item>
  </channel>
</rss>

