<?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 Knowing the polygon id and getting the extent in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/knowing-the-polygon-id-and-getting-the-extent/m-p/107925#M10015</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a text box where I have the polygon Id like, &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;"id_of_the_polygon_12345"&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;. Is it possible to get its extent on the map and zoom into it? I have figured out how to do it upon clicking on the map. But could not figure how to do the same knowing my poly Id.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 May 2013 05:13:21 GMT</pubDate>
    <dc:creator>PrasannaRaghavendar</dc:creator>
    <dc:date>2013-05-27T05:13:21Z</dc:date>
    <item>
      <title>Knowing the polygon id and getting the extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/knowing-the-polygon-id-and-getting-the-extent/m-p/107925#M10015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a text box where I have the polygon Id like, &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;"id_of_the_polygon_12345"&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;. Is it possible to get its extent on the map and zoom into it? I have figured out how to do it upon clicking on the map. But could not figure how to do the same knowing my poly Id.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 May 2013 05:13:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/knowing-the-polygon-id-and-getting-the-extent/m-p/107925#M10015</guid>
      <dc:creator>PrasannaRaghavendar</dc:creator>
      <dc:date>2013-05-27T05:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Knowing the polygon id and getting the extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/knowing-the-polygon-id-and-getting-the-extent/m-p/107926#M10016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Could you elaborate more on your functionality, what actually you want to do?.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 May 2013 05:18:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/knowing-the-polygon-id-and-getting-the-extent/m-p/107926#M10016</guid>
      <dc:creator>VinayBansal</dc:creator>
      <dc:date>2013-05-27T05:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Knowing the polygon id and getting the extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/knowing-the-polygon-id-and-getting-the-extent/m-p/107927#M10017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know that I can zoom to a polygon when it is clicked by doing this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;identifyParams.geometry = evt.mapPoint;
identifyParams.mapExtent = map.extent;
identifyTask.execute(identifyParams, function(result) { 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var i;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var polyId= new Array();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(i=0; i&amp;lt;result.length;i++){&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; polyId&lt;I&gt;=result&lt;I&gt;.feature.attributes["UNIQPOLYID"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I do not want to do it upon clicking on the map. When the user enters the polygon id in a text box, I want to zoom and show that polygon on the screen.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:31:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/knowing-the-polygon-id-and-getting-the-extent/m-p/107927#M10017</guid>
      <dc:creator>PrasannaRaghavendar</dc:creator>
      <dc:date>2021-12-11T06:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Knowing the polygon id and getting the extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/knowing-the-polygon-id-and-getting-the-extent/m-p/107928#M10018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Means you need to query based on the polygon Id.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For that you need to use query task&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can take input from this sample on how to call query task on layer you want to query&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/query_nomap.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/query_nomap.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once you got the results, get the geomtry and zoom to its extents on map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 May 2013 05:33:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/knowing-the-polygon-id-and-getting-the-extent/m-p/107928#M10018</guid>
      <dc:creator>VinayBansal</dc:creator>
      <dc:date>2013-05-27T05:33:06Z</dc:date>
    </item>
  </channel>
</rss>

