<?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: Extent-based spatial query on FeatureLayer made from featureCollectionObject in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-based-spatial-query-on-featurelayer-made/m-p/88461#M8029</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Derek - I was able to get it to work by copying the format of your example.&amp;nbsp; There were a couple differences with my code (but not much).&amp;nbsp; Following the example's layout solved the problem for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The next challenge is to get paging to work with the popups....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jan 2014 15:50:51 GMT</pubDate>
    <dc:creator>Jay_Gregory</dc:creator>
    <dc:date>2014-01-09T15:50:51Z</dc:date>
    <item>
      <title>Extent-based spatial query on FeatureLayer made from featureCollectionObject</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-based-spatial-query-on-featurelayer-made/m-p/88459#M8027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have created a FeatureLayer based on a featureCollectionObject (i.e. not from a service URL), and I would like to perform a spatial query on it.&amp;nbsp; The &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#featurelayer2" rel="nofollow" target="_blank"&gt;documentation&lt;/A&gt;&lt;SPAN&gt; claims that it "does not support queries that need to be performed on the server, e.g. queries with a where clause or non-extent based spatial queries."&amp;nbsp; So according to this, it should support an extent based spatial query.&amp;nbsp; However, when I construct my query:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var query = new Query(); query.geometry = pointToExtent(map, evt.mapPoint, 20);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and try to execute, I get the following error message: "FeatureLayer::selectFeatures - query contains one or more unsupported parameters."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried changing the query.spatialRelationship attribute (from the default INTERECTS to CONTAINS or WITHIN) but that doesn't help.&amp;nbsp; There are no other aspects to the query - no where clause or time clause or anything other than the geometry (which I've set to an extent).&amp;nbsp; Can someone help me execute this query correctly?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2014 16:23:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-based-spatial-query-on-featurelayer-made/m-p/88459#M8027</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2014-01-08T16:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Extent-based spatial query on FeatureLayer made from featureCollectionObject</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-based-spatial-query-on-featurelayer-made/m-p/88460#M8028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you post a full repro case?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit:&amp;nbsp; here's a working example:&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://dl.dropboxusercontent.com/u/2654618/fl-from-fc/fl-from-fc-query-with-extent.html" rel="nofollow" target="_blank"&gt;http://dl.dropboxusercontent.com/u/2654618/fl-from-fc/fl-from-fc-query-with-extent.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Relevant code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;map.on("click", function(e) { &amp;nbsp; map.graphics.clear(); &amp;nbsp; // create an extent &amp;nbsp; var pad = map.extent.getWidth() / 10; &amp;nbsp; var extent = new Extent( &amp;nbsp;&amp;nbsp;&amp;nbsp; e.mapPoint.x - pad, e.mapPoint.y - pad,&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.mapPoint.x + pad, e.mapPoint.y + pad, map.spatialReference &amp;nbsp; ); &amp;nbsp; // add the extent as a graphic &amp;nbsp; map.graphics.add(new Graphic( &amp;nbsp;&amp;nbsp;&amp;nbsp; extent, new SimpleFillSymbol().setColor(null).outline.setColor("#fff") &amp;nbsp; )); &amp;nbsp; var q = new Query(); &amp;nbsp; q.geometry = extent; &amp;nbsp; featureLayer.queryFeatures(q).then( &amp;nbsp;&amp;nbsp;&amp;nbsp; function(result) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("query result", result); &amp;nbsp;&amp;nbsp;&amp;nbsp; }, &amp;nbsp;&amp;nbsp;&amp;nbsp; function(error) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("query error", error); &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp; ); });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2014 18:32:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-based-spatial-query-on-featurelayer-made/m-p/88460#M8028</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2014-01-08T18:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Extent-based spatial query on FeatureLayer made from featureCollectionObject</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-based-spatial-query-on-featurelayer-made/m-p/88461#M8029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Derek - I was able to get it to work by copying the format of your example.&amp;nbsp; There were a couple differences with my code (but not much).&amp;nbsp; Following the example's layout solved the problem for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The next challenge is to get paging to work with the popups....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jan 2014 15:50:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-based-spatial-query-on-featurelayer-made/m-p/88461#M8029</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2014-01-09T15:50:51Z</dc:date>
    </item>
  </channel>
</rss>

