<?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 how to give parameters to geoprocessing results as map service in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-give-parameters-to-geoprocessing-results-as/m-p/641835#M59916</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have published a geoprocess in ArcGIS Server and &lt;/SPAN&gt;&lt;STRONG&gt;checked the option to see the result in a map service&lt;/STRONG&gt;&lt;SPAN&gt;. I have now a new map service that output the results correctly on the map like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var outputBuffer = new esri.layers.ArcGISDynamicMapServiceLayer("http://localhost:6080/arcgis/rest/services/buffer/MapServer",{ &amp;nbsp;&amp;nbsp;&amp;nbsp; opacity: 0.75 }); map.addLayer(outputBuffer);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, I would like to know how (if its possible) to define parameters like &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Query&lt;/SPAN&gt;&lt;SPAN&gt; or to give data selection or distance parameters as input. Is it possible to do it simply by adding properties in the layer definition or do I have to use the geoprocessing service instead (not the map service of the geoprocess)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jan 2014 18:58:40 GMT</pubDate>
    <dc:creator>MaxDemars</dc:creator>
    <dc:date>2014-01-16T18:58:40Z</dc:date>
    <item>
      <title>how to give parameters to geoprocessing results as map service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-give-parameters-to-geoprocessing-results-as/m-p/641835#M59916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have published a geoprocess in ArcGIS Server and &lt;/SPAN&gt;&lt;STRONG&gt;checked the option to see the result in a map service&lt;/STRONG&gt;&lt;SPAN&gt;. I have now a new map service that output the results correctly on the map like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var outputBuffer = new esri.layers.ArcGISDynamicMapServiceLayer("http://localhost:6080/arcgis/rest/services/buffer/MapServer",{ &amp;nbsp;&amp;nbsp;&amp;nbsp; opacity: 0.75 }); map.addLayer(outputBuffer);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, I would like to know how (if its possible) to define parameters like &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Query&lt;/SPAN&gt;&lt;SPAN&gt; or to give data selection or distance parameters as input. Is it possible to do it simply by adding properties in the layer definition or do I have to use the geoprocessing service instead (not the map service of the geoprocess)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 18:58:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-give-parameters-to-geoprocessing-results-as/m-p/641835#M59916</guid>
      <dc:creator>MaxDemars</dc:creator>
      <dc:date>2014-01-16T18:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to give parameters to geoprocessing results as map service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-give-parameters-to-geoprocessing-results-as/m-p/641836#M59917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use a Query task to filter a layer based on your parameters. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See the following links and let me know if that helps:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jssamples/fl_paging.html"&gt;https://developers.arcgis.com/en/javascript/jssamples/fl_paging.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jsapi/querytask-amd.html"&gt;https://developers.arcgis.com/en/javascript/jsapi/querytask-amd.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jan 2014 20:21:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-give-parameters-to-geoprocessing-results-as/m-p/641836#M59917</guid>
      <dc:creator>RobertoPepato</dc:creator>
      <dc:date>2014-01-16T20:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: how to give parameters to geoprocessing results as map service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-give-parameters-to-geoprocessing-results-as/m-p/641837#M59918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your help pepatops!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not sure to understand well how it works. I tried like this without success:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var bufferPoly = new esri.tasks.QueryTask("http://localhost:6080/arcgis/rest/services/buffer/MapServer");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var query = new esri.tasks.Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where = "1=1";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.returnGeometry = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bufferPoly.execute(query);
&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; bufferPoly.on("complete", function(result){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(result)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(result);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the query "1=1" just to test. It should returns all features. There is no error message in the server or console log but the buffers are not rendered on the map. Do I have to define the result layer styles?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:16:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-give-parameters-to-geoprocessing-results-as/m-p/641837#M59918</guid>
      <dc:creator>MaxDemars</dc:creator>
      <dc:date>2021-12-12T03:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to give parameters to geoprocessing results as map service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-give-parameters-to-geoprocessing-results-as/m-p/641838#M59919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thank you for your help pepatops!&lt;BR /&gt;&lt;BR /&gt;I am not sure to understand well how it works. I tried like this without success:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var bufferPoly = new esri.tasks.QueryTask("http://localhost:6080/arcgis/rest/services/buffer/MapServer"); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var query = new esri.tasks.Query(); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where = "1=1"; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.returnGeometry = true; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bufferPoly.execute(query); &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; bufferPoly.on("complete", function(result){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(result) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(result); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;I am using the query "1=1" just to test. It should returns all features. There is no error message in the server or console log but the buffers are not rendered on the map. Do I have to define the result layer styles?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You're own your way to go, but you should specify to the query task which layer must have be filtered, by using the layer index on the map service. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, instead of:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var bufferPoly = new esri.tasks.QueryTask("http://localhost:6080/arcgis/rest/services/buffer/MapServer");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You should have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var bufferPoly = new esri.tasks.QueryTask("http://localhost:6080/arcgis/rest/services/buffer/MapServer/0");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or 1, or 2, or whatever is the index of the layer being filtered.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Roberto Pepato&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 12:53:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-give-parameters-to-geoprocessing-results-as/m-p/641838#M59919</guid>
      <dc:creator>RobertoPepato</dc:creator>
      <dc:date>2014-01-17T12:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to give parameters to geoprocessing results as map service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-give-parameters-to-geoprocessing-results-as/m-p/641839#M59920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You're own your way to go, but you should specify to the query task which layer must have be filtered, by using the layer index on the map service. &lt;BR /&gt;&lt;BR /&gt;So, instead of:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;var bufferPoly = new esri.tasks.QueryTask("http://localhost:6080/arcgis/rest/services/buffer/MapServer");&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;You should have:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;var bufferPoly = new esri.tasks.QueryTask("http://localhost:6080/arcgis/rest/services/buffer/MapServer/0");&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;or 1, or 2, or whatever is the index of the layer being filtered.&lt;BR /&gt;&lt;BR /&gt;Regards.&lt;BR /&gt;&lt;BR /&gt;Roberto Pepato&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you, thats do it! I can filter the result by a field and map it. My last question is, is it possible to set the input features, for instance, apply the geoprocessing to a subset of selected features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or is it possible to change geoprocessing parameters (like the buffer distance) the same way, ie using QueryTask.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 12:57:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-give-parameters-to-geoprocessing-results-as/m-p/641839#M59920</guid>
      <dc:creator>MaxDemars</dc:creator>
      <dc:date>2014-01-17T12:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to give parameters to geoprocessing results as map service</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-give-parameters-to-geoprocessing-results-as/m-p/641840#M59921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thank you, thats do it! I can filter the result by a field and map it. My last question is, is it possible to set the input features, for instance, apply the geoprocessing to a subset of selected features.&lt;BR /&gt;&lt;BR /&gt;Or is it possible to change geoprocessing parameters (like the buffer distance) the same way, ie using QueryTask.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can pass a geometry instance to the query object. Doing that, the query results will be constrained to the area of the geometry parameter. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need a buffer over the geometry parameter, you can first use the GeometryService to bufferize your geometry and, after that, use it as the parameter to the query task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jssamples/query_buffer.html"&gt;https://developers.arcgis.com/en/javascript/jssamples/query_buffer.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jsapi/geometryservice-amd.html#buffer"&gt;https://developers.arcgis.com/en/javascript/jsapi/geometryservice-amd.html#buffer&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2014 13:09:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-give-parameters-to-geoprocessing-results-as/m-p/641840#M59921</guid>
      <dc:creator>RobertoPepato</dc:creator>
      <dc:date>2014-01-17T13:09:51Z</dc:date>
    </item>
  </channel>
</rss>

