<?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: spatial query for point inspection in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatial-query-for-point-inspection/m-p/133906#M12472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nadir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I think Miriam is on the right track here. You are mixing Legacy and AMD in your code and you REALLY need to get out of this habit. If you are not aware what differentiates the two then the simple way to know is if you are using "esri.tasks.QueryTask" instead of just "QueryTask" and it associated require then you are using Legacy. I do not recommend anyone continue using Legacy module as the JS API 4.0 is just about to be released and legacy will NOT be supported. Spend some time reading this blog about AMD&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.esri.com/esri/arcgis/2013/10/14/the-abcs-of-amd/" title="https://blogs.esri.com/esri/arcgis/2013/10/14/the-abcs-of-amd/" rel="nofollow noopener noreferrer" target="_blank"&gt;The abc’s of AMD | ArcGIS Blog&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So assuming that you have the require for QueryTask and Query as well as their positional arguments then your code would look like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;pt = new Point(txtLong, txtLat, map.spatialReference);
queryTask = new QueryTask(RestServiceUrl + "/4");
query = new Query();
query.geometry = pt;

query.spatialRelationship = Query.SPATIAL_REL_WITHIN;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 07:29:58 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2021-12-11T07:29:58Z</dc:date>
    <item>
      <title>spatial query for point inspection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatial-query-for-point-inspection/m-p/133902#M12468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am facing problem to check weather my point inside the one polygon layer extent are it is outside.i draw the point from my input coordinates paramter.in the map i have another layer which is polygon.i add the point on map and i can see it is inside.but my code always retur point outside from polygon&amp;nbsp; extent layer.please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 19:01:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatial-query-for-point-inspection/m-p/133902#M12468</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2016-03-02T19:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: spatial query for point inspection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatial-query-for-point-inspection/m-p/133903#M12469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nadir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; What does the code look like that you are using to check if the polygon contains the point? Are the point and the Polygon Feature in the same WKID?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 19:24:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatial-query-for-point-inspection/m-p/133903#M12469</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-03-02T19:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: spatial query for point inspection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatial-query-for-point-inspection/m-p/133904#M12470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear robert&lt;/P&gt;&lt;P&gt; my code below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; pt = new Point(txtLong, txtLat, map.spatialReference);&lt;/P&gt;&lt;P&gt; queryTask = new esri.tasks.QueryTask(RestServiceUrl + "/4");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query = new esri.tasks.Query();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.geometry = pt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // query.spatialRelationship = Query.SPATIAL_REL_INTERSECTS;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.spatialRelationship = Query.SPATIAL_REL_WITHIN;&lt;/P&gt;&lt;P&gt;i check both query option.but same result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 10:02:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatial-query-for-point-inspection/m-p/133904#M12470</guid>
      <dc:creator>NadirHussain</dc:creator>
      <dc:date>2016-03-03T10:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: spatial query for point inspection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatial-query-for-point-inspection/m-p/133905#M12471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nadir!&lt;/P&gt;&lt;P&gt;Is this the complete Code? Have you check your require if it's complete?&lt;/P&gt;&lt;P&gt;It seems you are using the legacy-Modul, is that right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you check the legacy Documentation for the esri.Task.query your definition should look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.spatialRelationship = esri.Task.Query.SPATIAL_REL_WITHIN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe this will do the job.&lt;/P&gt;&lt;P&gt;By the way, &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;I would recommend you to have a close look inside the documentation.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/query.html" title="https://developers.arcgis.com/javascript/jsapi/query.html"&gt;Query (legacy) | API Reference | ArcGIS API for JavaScript&lt;/A&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Regards, Miriam&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 11:21:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatial-query-for-point-inspection/m-p/133905#M12471</guid>
      <dc:creator>MiriamBrockmann</dc:creator>
      <dc:date>2016-03-03T11:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: spatial query for point inspection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatial-query-for-point-inspection/m-p/133906#M12472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nadir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I think Miriam is on the right track here. You are mixing Legacy and AMD in your code and you REALLY need to get out of this habit. If you are not aware what differentiates the two then the simple way to know is if you are using "esri.tasks.QueryTask" instead of just "QueryTask" and it associated require then you are using Legacy. I do not recommend anyone continue using Legacy module as the JS API 4.0 is just about to be released and legacy will NOT be supported. Spend some time reading this blog about AMD&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.esri.com/esri/arcgis/2013/10/14/the-abcs-of-amd/" title="https://blogs.esri.com/esri/arcgis/2013/10/14/the-abcs-of-amd/" rel="nofollow noopener noreferrer" target="_blank"&gt;The abc’s of AMD | ArcGIS Blog&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So assuming that you have the require for QueryTask and Query as well as their positional arguments then your code would look like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;pt = new Point(txtLong, txtLat, map.spatialReference);
queryTask = new QueryTask(RestServiceUrl + "/4");
query = new Query();
query.geometry = pt;

query.spatialRelationship = Query.SPATIAL_REL_WITHIN;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:29:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/spatial-query-for-point-inspection/m-p/133906#M12472</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T07:29:58Z</dc:date>
    </item>
  </channel>
</rss>

