<?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: Alternatives to Geoprocessing Widget, anyone? Ways to generate sample JSON for testing GP Service, anyone else? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458426#M15459</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am going to boldly answer Part 2 of my own question from last month (last year).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a web map stored as an item in&amp;nbsp;Portal, you can get a JSON representation of it using the following URL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;https://&amp;lt;yourwebadaptor&amp;gt;.&amp;lt;yourdomain&amp;gt;/portal/sharing/rest/content/items/&amp;lt;youritemsnearlyendlessandgibberishishID?f=pjson&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jan 2020 22:14:31 GMT</pubDate>
    <dc:creator>Arne_Gelfert</dc:creator>
    <dc:date>2020-01-08T22:14:31Z</dc:date>
    <item>
      <title>Alternatives to Geoprocessing Widget, anyone? Ways to generate sample JSON for testing GP Service, anyone else?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458425#M15458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm in the process of converting some existing custom Geocortex tools to ESRI WAB and JSAPI web tools.&lt;/P&gt;&lt;P&gt;For one of these, what I'm looking to recreate is the ability to:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Query for and select a feature&lt;/LI&gt;&lt;LI&gt;Generate a set of PDF maps centered on that feature with some pretty strict layout spec's.&lt;/LI&gt;&lt;LI&gt;Finally prompt the user to download/save the PDFs as ZIP.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;ESRI suggested that I look into using the &lt;A href="https://doc.arcgis.com/en/web-appbuilder/create-apps/widget-geoprocessing.htm"&gt;Geoprocessing Widget&lt;/A&gt;&amp;nbsp;to call a geoprocessing service that generates the maps. GP Widget looks promising.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;QUESTION 1&lt;/STRONG&gt; - Is there another more appropriate out of the box offering? I've previously set up a custom print template on my hosting server, which worked fine. But what I need is a little more, I guess you'd say - complex. More like a fancy ultra print widget with the ability to pass in some parameters that are used as text in a print template.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, I immediately started reading about &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/convertwebmaptoarcgisproject.htm"&gt;arcpy.ConvertWebMapToArcGISProject()&lt;/A&gt;. The thought of working out my functionality in Python has a much great appeal than trying to whip up some jimu-jambalaya in WAB (sorry still not feeling the love).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;QUESTION 2&lt;/STRONG&gt; - What is the easiest way for me to generate some sample JSON based off an actual web map of mine that I can use for testing with my geoprocessing code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could, of course, follow the guidelines &lt;A href="https://enterprise.arcgis.com/en/server/latest/create-web-apps/windows/exportwebmap-specification.htm"&gt;here.&amp;nbsp;B&lt;/A&gt;ut is there a simpler (lazier) way? Something similar to generating JSON output for a map service using the "?f=pjson." karate chop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;https://server.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade_Dark/MapServer/0/?f=pjson&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hey, thanks for chiming in.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Dec 2019 20:05:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458425#M15458</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2019-12-17T20:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Alternatives to Geoprocessing Widget, anyone? Ways to generate sample JSON for testing GP Service, anyone else?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458426#M15459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am going to boldly answer Part 2 of my own question from last month (last year).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a web map stored as an item in&amp;nbsp;Portal, you can get a JSON representation of it using the following URL:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;https://&amp;lt;yourwebadaptor&amp;gt;.&amp;lt;yourdomain&amp;gt;/portal/sharing/rest/content/items/&amp;lt;youritemsnearlyendlessandgibberishishID?f=pjson&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2020 22:14:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458426#M15459</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2020-01-08T22:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Alternatives to Geoprocessing Widget, anyone? Ways to generate sample JSON for testing GP Service, anyone else?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458427#M15460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hold that thought, buster!&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's some pretty JSON but not at all like the kind I&amp;nbsp;was looking for...&amp;nbsp;which was:&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;{ "mapOptions": {}, 
  "operationalLayers": [], 
  "baseMap": [], "
   exportOptions": {}, 
  "layoutOptions": {} }&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;What's going on here?!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:24:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458427#M15460</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2021-12-11T20:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Alternatives to Geoprocessing Widget, anyone? Ways to generate sample JSON for testing GP Service, anyone else?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458428#M15461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just doing a post-mortem on this one: You can your JSON from&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;esri/tasks/PrintTask&lt;/SPAN&gt;, as explained here:&amp;nbsp;&lt;A href="https://community.esri.com/thread/164008"&gt;Get the WebMap from Javascript API esri/map&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2020 21:56:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458428#M15461</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2020-02-27T21:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Alternatives to Geoprocessing Widget, anyone? Ways to generate sample JSON for testing GP Service, anyone else?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458429#M15462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, it seems you figured it out! I'm trying to do the same things. I already have the first part of the workflow: I have a script that selects what I need. Next is to print out the map along with a summary of several attributes and a legend. My thought is to create a custom print service, but not sure how to incorporate this in my existing script (or, if I should). I really want to limit the number of clicks the user needs to do; ideally, they should be able to click the map, the GP tool should start running, then prompt the user to save a PDF map.&lt;/P&gt;&lt;P&gt;The "ConvertWebMapToArcGISProject" is a little confusing to me, though. I don't need to be able to open the map in ArcMap/Pro. Any thoughts/suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2020 13:50:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458429#M15462</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-07-01T13:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Alternatives to Geoprocessing Widget, anyone? Ways to generate sample JSON for testing GP Service, anyone else?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458430#M15463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agree with you, some of the ESRI examples look real straight forward until you try to solve a real world problem. For me it came down creating a GP Service in Python that does what I need with a map saved in APRX project. You can work in Pro or Python until you have that right. Once that's done, you call that services using...&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/geoprocessor-amd.html" style="color: #2989c5; text-decoration: none;"&gt;Geoprocessor&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Once you have an instance of a geoprocessing service to call and a printTask in Javascript, you&amp;nbsp;can do something like:&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; font-size: 14px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;SPAN style="color: #3d3d3d; background-color: #f6f6f6;"&gt;var webMapAsJSON = printTask._getPrintDefinition(currentMap, params);&lt;/SPAN&gt;&lt;BR style="color: #3d3d3d; background-color: #f6f6f6;" /&gt;&lt;SPAN style="color: #3d3d3d; background-color: #f6f6f6;"&gt;var webMapAsJSONasString = JSON.stringify(webMapAsJSON);&lt;/SPAN&gt;&lt;BR style="color: #3d3d3d; background-color: #f6f6f6;" /&gt;&lt;SPAN style="color: #3d3d3d; background-color: #f6f6f6;"&gt;var file;&lt;/SPAN&gt;&lt;BR style="color: #3d3d3d; background-color: #f6f6f6;" /&gt;&lt;SPAN style="color: #3d3d3d; background-color: #f6f6f6;"&gt;var gpParams = {"Web_Map_as_JSON" : webMapAsJSONasString,&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; background-color: #f6f6f6;"&gt;"PDFOutputFile" : file};&lt;/SPAN&gt;&lt;BR style="color: #3d3d3d; background-color: #f6f6f6;" /&gt;&lt;SPAN style="color: #3d3d3d; background-color: #f6f6f6;"&gt;gp.submitJob(gpParams, this.completeCallback, this.statusCallback);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Let me know if that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2020 13:26:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458430#M15463</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2020-07-06T13:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Alternatives to Geoprocessing Widget, anyone? Ways to generate sample JSON for testing GP Service, anyone else?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458431#M15464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your input. We're in the early stages, so I'll let you know when we get this implemented!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2020 17:13:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/alternatives-to-geoprocessing-widget-anyone-ways/m-p/458431#M15464</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-07-06T17:13:57Z</dc:date>
    </item>
  </channel>
</rss>

