<?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: QueryTask return points inside and extent in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528885#M49325</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;INTERSECT brings back all the points which touch the edges of the extent &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason I know the spatialreference is correct is that using "map.graphics.add(extent, symbol)" puts the extent on the map in the correct place and "&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;map.setExtent(extent);" takes me to the correct extent. After that I can see that the points "INTERSECT"-ing the boundaries of the extent are returned.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Jul 2016 06:16:17 GMT</pubDate>
    <dc:creator>MatthewRyan2</dc:creator>
    <dc:date>2016-07-01T06:16:17Z</dc:date>
    <item>
      <title>QueryTask return points inside and extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528879#M49319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't figure out a way to send a query to an ArcGIS rest endpoint asking for all the points which are contained within an extent.&lt;STRONG&gt; Does anyone know how to do this?&lt;/STRONG&gt; Below is some code I've tried (sensitive information removed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var extent: esri.geometry.Extent = new esri.geometry.Extent(pointMinX, pointMinY, pointMaxX, pointMaxY, point.spatialReference);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var queryTask: esri.tasks.QueryTask = new esri.tasks.QueryTask({ArcServiceURL}, null);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var query: esri.tasks.Query = new esri.tasks.Query();&lt;/P&gt;&lt;P&gt;query.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS; &lt;STRONG&gt;// what to use here???&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;query.geometry = extent;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;query.returnGeometry = true;&lt;/P&gt;&lt;P&gt;query.outFields = ["*"];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;query.where = "1 = 1";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;map.setExtent(extent); // This works. Changes to the correct extent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The question again --&lt;STRONG&gt; How can I send and extent in a query so that it brings back all the points contained inside that extent?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2016 07:19:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528879#M49319</guid>
      <dc:creator>MatthewRyan2</dc:creator>
      <dc:date>2016-06-30T07:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask return points inside and extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528880#M49320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you just need to execute the queryTask with a callback funtion specified:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/querytask-amd.html#execute" title="https://developers.arcgis.com/javascript/3/jsapi/querytask-amd.html#execute"&gt;QueryTask | API Reference | ArcGIS API for JavaScript 3.17&lt;/A&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14672729529822498 jive_text_macro" data-renderedposition="60_8_1315_16" jivemacro_uid="_14672729529822498" modifiedtitle="true"&gt;&lt;P&gt;queryTask.execute(query, doStuffWithResults);&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2016 07:49:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528880#M49320</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-06-30T07:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask return points inside and extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528881#M49321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's not the issue Basson. It's about when queryTask.exectute(query, doStuffWithResults) is called. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works and I need it to have a spatial query specified which will return &lt;STRONG&gt;bring back everything inside the extent variable given&lt;/STRONG&gt;. I've tried all combinations and no spatial relationship operator brings back all the results specified inside the geometry specified.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 00:54:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528881#M49321</guid>
      <dc:creator>MatthewRyan2</dc:creator>
      <dc:date>2016-07-01T00:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask return points inside and extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528882#M49322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are the number of points that you expect to be returned more than the Map/Feature Service record limit e.g. 1000?&amp;nbsp; You can find this at the REST endpoint information in the services directory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 05:40:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528882#M49322</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-07-01T05:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask return points inside and extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528883#M49323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nah, it's nothing to do with that. Look at &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/query-amd.html" title="https://developers.arcgis.com/javascript/3/jsapi/query-amd.html"&gt;Query | API Reference | ArcGIS API for JavaScript 3.17&lt;/A&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There^ you will see the "Constants" area with a bunch of SPATIAL_REL_XXXXX constants. I need to know if one of these will return all the points founds at the rest endpoint found inside the input geometry. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 05:49:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528883#M49323</guid>
      <dc:creator>MatthewRyan2</dc:creator>
      <dc:date>2016-07-01T05:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask return points inside and extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528884#M49324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then INTERSECT should work.&amp;nbsp; Might need to recheck that extent geometry to make sure it is valid for your map and spatialreference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 06:07:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528884#M49324</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-07-01T06:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask return points inside and extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528885#M49325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;INTERSECT brings back all the points which touch the edges of the extent &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason I know the spatialreference is correct is that using "map.graphics.add(extent, symbol)" puts the extent on the map in the correct place and "&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;map.setExtent(extent);" takes me to the correct extent. After that I can see that the points "INTERSECT"-ing the boundaries of the extent are returned.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 06:16:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528885#M49325</guid>
      <dc:creator>MatthewRyan2</dc:creator>
      <dc:date>2016-07-01T06:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask return points inside and extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528886#M49326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Only inside: SPATIAL_REL_CONTAINS or SPATIAL_REL_WITHIN:&lt;/P&gt;&lt;P&gt;Also make sure you set the geometry precision finer to something like 0.00001 if working in a geographic coordinate system.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 06:22:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/querytask-return-points-inside-and-extent/m-p/528886#M49326</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-07-01T06:22:09Z</dc:date>
    </item>
  </channel>
</rss>

