<?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 Sending polygon to gp service in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sending-polygon-to-gp-service/m-p/568728#M53026</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a map service where someone can select a polygon and that selected polygon is sent to a gp service as a clipping extent.&amp;nbsp; The polygon where the user clicks is made into a graphic, and then that graphic is then sent to the gp service.&amp;nbsp; The problem is the gp service does not recognize this as a valid clipping extent and the tool fails because of that parameter.&amp;nbsp; I have tried converting this graphic from web mercator to geographic, and also have tried using the esri.geometry.Polygon(name of graphic) command to try and make it a valid polygon which the gp service can use but I can't seem to get it to work.&amp;nbsp; Please let me know if you have any idea how to solve this problem.&amp;nbsp; Thank you for your time!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Jan 2013 16:02:19 GMT</pubDate>
    <dc:creator>StephenFricke</dc:creator>
    <dc:date>2013-01-15T16:02:19Z</dc:date>
    <item>
      <title>Sending polygon to gp service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sending-polygon-to-gp-service/m-p/568728#M53026</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a map service where someone can select a polygon and that selected polygon is sent to a gp service as a clipping extent.&amp;nbsp; The polygon where the user clicks is made into a graphic, and then that graphic is then sent to the gp service.&amp;nbsp; The problem is the gp service does not recognize this as a valid clipping extent and the tool fails because of that parameter.&amp;nbsp; I have tried converting this graphic from web mercator to geographic, and also have tried using the esri.geometry.Polygon(name of graphic) command to try and make it a valid polygon which the gp service can use but I can't seem to get it to work.&amp;nbsp; Please let me know if you have any idea how to solve this problem.&amp;nbsp; Thank you for your time!!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 16:02:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sending-polygon-to-gp-service/m-p/568728#M53026</guid>
      <dc:creator>StephenFricke</dc:creator>
      <dc:date>2013-01-15T16:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sending polygon to gp service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sending-polygon-to-gp-service/m-p/568729#M53027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a GP service that takes a user-drawn polygon and uses it as a clipping extent as well.&amp;nbsp; The actual input the GP service is expecting is a GPFeatureRecordSetLayer, which I got from the DataType field of the parameter in the REST service endpoint.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know if that is your setup as well, but here is my code to take a graphic and submit it to the gp task: &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var features = [];
&amp;nbsp;&amp;nbsp; features.push(graphic);
&amp;nbsp;&amp;nbsp; var featureSet = new esri.tasks.FeatureSet();
&amp;nbsp;&amp;nbsp; featureSet.features = features;
&amp;nbsp;&amp;nbsp; var params = {"Selecting_Geometry": featureSet, "OutputType": format};
&amp;nbsp;&amp;nbsp; gp.submitJob(params, completeCallback, statusCallback, function(error){....&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;BLOCKQUOTE&gt;dugtoni;263832 wrote:&lt;BR /&gt;Hey everyone,&lt;/BLOCKQUOTE&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a map service where someone can select a polygon and that selected polygon is sent to a gp service as a clipping extent.&amp;nbsp; The polygon where the user clicks is made into a graphic, and then that graphic is then sent to the gp service.&amp;nbsp; The problem is the gp service does not recognize this as a valid clipping extent and the tool fails because of that parameter.&amp;nbsp; I have tried converting this graphic from web mercator to geographic, and also have tried using the esri.geometry.Polygon(name of graphic) command to try and make it a valid polygon which the gp service can use but I can't seem to get it to work.&amp;nbsp; Please let me know if you have any idea how to solve this problem.&amp;nbsp; Thank you for your time!![/Q&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:29:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/sending-polygon-to-gp-service/m-p/568729#M53027</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2021-12-12T00:29:33Z</dc:date>
    </item>
  </channel>
</rss>

