<?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: Using IdentifyTasks/IdentifyParamters to find a grid cell in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identifytasks-identifyparamters-to-find-a/m-p/650050#M60620</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Justin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;First off the point var needs to be an actual esri geometry. In your case an actual point class. Next your identifyParams need some more properties filled.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; point &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Point&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;yourx&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; yourY&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; yourPointsSR&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍
identifyParams &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;IdentifyParameters&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;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; point&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;returnGeometry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layerOption &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; IdentifyParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LAYER_OPTION_ALL&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layerIds &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//The specific layers of the map Service you will be identifying‍‍‍‍‍‍‍&lt;/SPAN&gt;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;height &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;height&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;width&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;width&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapExtent &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 03:34:01 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2021-12-12T03:34:01Z</dc:date>
    <item>
      <title>Using IdentifyTasks/IdentifyParamters to find a grid cell</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identifytasks-identifyparamters-to-find-a/m-p/650049#M60619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a simple map service API that serves a grid feature and I want to grab an attribute ("Grid_Cell2") that has the grid cell name when the user clicks a button. The grid feature has start and end points (x, y) for each cell and a field called "Grid_Cell2" which is basically the grid cell name (ex: "Grid_Cell49_19"). I am already capturing my x, y for the mouse click on the map in my application. The examples I have seen for&amp;nbsp;IdentifyTask&amp;nbsp;and&amp;nbsp;IdentifyParameters&amp;nbsp;generally show the&amp;nbsp;.executefor the&amp;nbsp;IdentifyTask&amp;nbsp;method being launched when the user clicks on the map (ex:map.on("click", executeIdentifyTask);`) and then populating a popup. I only want to grab the desired feature based on the users x, y (which I have already captured in a variable) when the user clicks the button. Assume I have already added the required module and function and initialized the function at the top:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getElementById&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"btnGetInterval"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;onclick &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&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="keyword token"&gt;var&lt;/SPAN&gt; point &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; additionalInfo&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"pointGeomOfInterest"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//this is an x, y coordinate captured earlier in my code from the user's mouse click on the map&lt;/SPAN&gt;
    identifyTask &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;IdentifyTask&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;grid_url&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    identifyParams &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;IdentifyParameters&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;
    identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; point&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
    identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;returnGeometry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//I don't want to return any geometry&lt;/SPAN&gt;
    identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layerOption &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; IdentifyParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LAYER_OPTION_ALL&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//Not sure about this. I just want to return the one feature for the grid cell whose boundaries my user's mouse click (x, y) falls within....&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;From here, I'm honestly not sure where to go; I assume I want to use a&amp;nbsp;.execute&amp;nbsp;statement but I am not sure how the `IdentifyParameters come into play. I also may need an empty var/array/list to hold the returned value (["Grid_Cell2"]). Any suggestions here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:33:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identifytasks-identifyparamters-to-find-a/m-p/650049#M60619</guid>
      <dc:creator>JustinBridwell2</dc:creator>
      <dc:date>2021-12-12T03:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using IdentifyTasks/IdentifyParamters to find a grid cell</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identifytasks-identifyparamters-to-find-a/m-p/650050#M60620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Justin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;First off the point var needs to be an actual esri geometry. In your case an actual point class. Next your identifyParams need some more properties filled.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; point &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Point&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;yourx&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; yourY&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; yourPointsSR&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍
identifyParams &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;IdentifyParameters&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;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; point&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;returnGeometry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layerOption &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; IdentifyParameters&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LAYER_OPTION_ALL&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layerIds &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//The specific layers of the map Service you will be identifying‍‍‍‍‍‍‍&lt;/SPAN&gt;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;height &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;height&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;width&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;width&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍
identifyParams&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapExtent &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:34:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identifytasks-identifyparamters-to-find-a/m-p/650050#M60620</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T03:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using IdentifyTasks/IdentifyParamters to find a grid cell</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identifytasks-identifyparamters-to-find-a/m-p/650051#M60621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Question: since I am basically just trying to get the value of a single field from a single feature on my map service, would it be easier to use `Query`&amp;nbsp;and `QueryTask`?&amp;nbsp; Also, what you're saying is that I can't simply plug in an x, y coordinate into .geometry? I need to initialize it as an&amp;nbsp;ESRI point first? So, something like this:&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;CODE&gt;var spatRef = new esri.SpatialReference({wkid:4326});
var point = new Point(additionalInfo&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;"pointGeomOfInterest"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;].x, &lt;/SPAN&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;CODE&gt;additionalInfo&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;"pointGeomOfInterest"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;].y, spatRef);&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I assume SR = spatial reference.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:34:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identifytasks-identifyparamters-to-find-a/m-p/650051#M60621</guid>
      <dc:creator>JustinBridwell2</dc:creator>
      <dc:date>2021-12-12T03:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using IdentifyTasks/IdentifyParamters to find a grid cell</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identifytasks-identifyparamters-to-find-a/m-p/650052#M60622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Justin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Yes, I believe a query task would be more appropriate in this scenario. Yes you have to create a actual Point class not just pass an XY array and SR is Spatial Reference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2019 13:27:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identifytasks-identifyparamters-to-find-a/m-p/650052#M60622</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2019-07-26T13:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using IdentifyTasks/IdentifyParamters to find a grid cell</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identifytasks-identifyparamters-to-find-a/m-p/650053#M60623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm going to try that (queryTask) and then repost if I have similar questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jul 2019 13:33:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-identifytasks-identifyparamters-to-find-a/m-p/650053#M60623</guid>
      <dc:creator>JustinBridwell2</dc:creator>
      <dc:date>2019-07-26T13:33:11Z</dc:date>
    </item>
  </channel>
</rss>

