<?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 Feature layer query occuring on server, not client in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-query-occuring-on-server-not-client/m-p/746311#M69049</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a an application with a feature that I'm running a selectFeatures command on.&amp;nbsp; When I created the feature layer, I put it in MODE_SNAPSHOT which should make everything available via the client. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the documentation, &lt;A href="https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#selectfeatures"&gt;https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#selectfeatures&lt;/A&gt;​, the query should run on the client, but when I look as the NET tab in the browser I can clearly see the features getting fetched from the server.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is jsFiddle that should illustrate the problem: &lt;A href="http://jsfiddle.net/nawm78kp/1/"&gt;http://jsfiddle.net/nawm78kp/1/&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Sep 2015 20:44:36 GMT</pubDate>
    <dc:creator>BillDaigle</dc:creator>
    <dc:date>2015-09-10T20:44:36Z</dc:date>
    <item>
      <title>Feature layer query occuring on server, not client</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-query-occuring-on-server-not-client/m-p/746311#M69049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a an application with a feature that I'm running a selectFeatures command on.&amp;nbsp; When I created the feature layer, I put it in MODE_SNAPSHOT which should make everything available via the client. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to the documentation, &lt;A href="https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#selectfeatures"&gt;https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#selectfeatures&lt;/A&gt;​, the query should run on the client, but when I look as the NET tab in the browser I can clearly see the features getting fetched from the server.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is jsFiddle that should illustrate the problem: &lt;A href="http://jsfiddle.net/nawm78kp/1/"&gt;http://jsfiddle.net/nawm78kp/1/&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I missing something?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2015 20:44:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-query-occuring-on-server-not-client/m-p/746311#M69049</guid>
      <dc:creator>BillDaigle</dc:creator>
      <dc:date>2015-09-10T20:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Feature layer query occuring on server, not client</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-query-occuring-on-server-not-client/m-p/746312#M69050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured it out by digging into the "_canDoClientSideQuery" function associated with the feature layer.&amp;nbsp; It appears as though the Query has to be of a very specific type for it to work.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Query spatialRelationship must be set to "SPATIAL_REL_INTERSECTS" and the geometry type must be an extent.&amp;nbsp; This seems overly restrictive and does not appear to be documented anywhere. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a working fiddle: &lt;A href="http://jsfiddle.net/nawm78kp/2/"&gt;http://jsfiddle.net/nawm78kp/2/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Sep 2015 15:24:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-layer-query-occuring-on-server-not-client/m-p/746312#M69050</guid>
      <dc:creator>BillDaigle</dc:creator>
      <dc:date>2015-09-11T15:24:24Z</dc:date>
    </item>
  </channel>
</rss>

