<?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 setFeaturesVisible not working in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/setfeaturesvisible-not-working/m-p/470566#M2384</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a list of features that I want to set the visibility on for on a feature layer.&amp;nbsp; I don't want to change the definition expression because I requery the layer periodically to get the latest attributes, I have to remove and readd the definition query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do something like this, but I cant seem to get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;property &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; allFeatures&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="punctuation token"&gt;)&lt;/SPAN&gt;
property &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; searchFeatures&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="punctuation token"&gt;)&lt;/SPAN&gt;
property Layer queryLayer&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;

onLengthChanged&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                        searchFeatures &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="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt; listModelFields&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;count&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i&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;
                               searchFeatures&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; features&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                        queryLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setFeaturesVisible&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;searchFeatures&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above snippet just shows where i am trying to apply the setFeaturesVisible.&amp;nbsp; I basically have a search bar, that when the length changes, I want the visible features to change with the filter this search bar performs on the model.&amp;nbsp; But with my list of features I cant seem to get them show or hide, in fact the code actually breaks.&amp;nbsp; Has anyone tried this function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 20:50:10 GMT</pubDate>
    <dc:creator>MKa</dc:creator>
    <dc:date>2021-12-11T20:50:10Z</dc:date>
    <item>
      <title>setFeaturesVisible not working</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/setfeaturesvisible-not-working/m-p/470566#M2384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a list of features that I want to set the visibility on for on a feature layer.&amp;nbsp; I don't want to change the definition expression because I requery the layer periodically to get the latest attributes, I have to remove and readd the definition query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do something like this, but I cant seem to get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;property &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; allFeatures&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="punctuation token"&gt;)&lt;/SPAN&gt;
property &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; searchFeatures&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="punctuation token"&gt;)&lt;/SPAN&gt;
property Layer queryLayer&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;

onLengthChanged&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                        searchFeatures &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="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt; listModelFields&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;count&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i&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;
                               searchFeatures&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; features&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                        queryLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setFeaturesVisible&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;searchFeatures&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above snippet just shows where i am trying to apply the setFeaturesVisible.&amp;nbsp; I basically have a search bar, that when the length changes, I want the visible features to change with the filter this search bar performs on the model.&amp;nbsp; But with my list of features I cant seem to get them show or hide, in fact the code actually breaks.&amp;nbsp; Has anyone tried this function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:50:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/setfeaturesvisible-not-working/m-p/470566#M2384</guid>
      <dc:creator>MKa</dc:creator>
      <dc:date>2021-12-11T20:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: setFeaturesVisible not working</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/setfeaturesvisible-not-working/m-p/470567#M2385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/62768"&gt;M Ka&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Can you try using list objects in your code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an object&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;searchFeatures &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;{&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;}&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a list/array&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;searchFeatures &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt; &lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;[]&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try that and let us know if that gets it working for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 17:04:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/setfeaturesvisible-not-working/m-p/470567#M2385</guid>
      <dc:creator>JamesBallard1</dc:creator>
      <dc:date>2020-04-23T17:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: setFeaturesVisible not working</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/setfeaturesvisible-not-working/m-p/470568#M2386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried using both ways and neither worked.&amp;nbsp; I feel like I am missing something, but I cant find an example of this anywhere.&amp;nbsp; I need to be able to do this as I just want features not to be visible and not remove them from the definition query.&amp;nbsp; Does anyone know of some code examples of this anywhere?&amp;nbsp; I looked through the entire qt samples and a quick internet search and I came up with nothing.&amp;nbsp; For now I have to remove the definition query before I search and refresh my layer, then add the query back in after the search returns all the features, this is suboptimal at best.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Apr 2020 18:11:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/setfeaturesvisible-not-working/m-p/470568#M2386</guid>
      <dc:creator>MKa</dc:creator>
      <dc:date>2020-04-23T18:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: setFeaturesVisible not working</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/setfeaturesvisible-not-working/m-p/470569#M2387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/62768"&gt;M Ka&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;There is an error in our documentation for that method. Please accept my apologies for this error. I also apologize for the delay in getting back to you on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The method you're calling has a second argument that is not documented properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; FeatureLayer&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setFeaturesVisible&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;list&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Feature&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; features&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; bool visible&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;Does that work if you pass the second arg?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/qml/api-reference/qml-esri-arcgisruntime-featurelayer.html" title="https://developers.arcgis.com/qt/latest/qml/api-reference/qml-esri-arcgisruntime-featurelayer.html"&gt;FeatureLayer QML Type | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'll get this fixed up asap.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 May 2020 23:41:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/setfeaturesvisible-not-working/m-p/470569#M2387</guid>
      <dc:creator>JamesBallard1</dc:creator>
      <dc:date>2020-05-01T23:41:32Z</dc:date>
    </item>
  </channel>
</rss>

