<?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: Export Web Map to image in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/export-web-map-to-image/m-p/881483#M5150</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for sharing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Oct 2018 22:18:53 GMT</pubDate>
    <dc:creator>simoxu</dc:creator>
    <dc:date>2018-10-22T22:18:53Z</dc:date>
    <item>
      <title>Export Web Map to image</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/export-web-map-to-image/m-p/881481#M5148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to export a web map constructed in python (1.5.0) as an image, however, when sending the web map to the export_map call, the JSON appears to be missing the MapOptions section of the JSON that is needed. Any thoughts on what I am missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;search_result = gis.content.search(&lt;SPAN style="color: #aa4926;"&gt;query&lt;/SPAN&gt;=&lt;SPAN style="color: #6a8759;"&gt;"title:" &lt;/SPAN&gt;+ carrier + &lt;SPAN style="color: #6a8759;"&gt;"_In-Force"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;item_type&lt;/SPAN&gt;=&lt;SPAN style="color: #6a8759;"&gt;"Feature Layer"&lt;/SPAN&gt;)
&lt;SPAN style="color: #8888c6;"&gt;print&lt;/SPAN&gt;(search_result[&lt;SPAN style="color: #6897bb;"&gt;0&lt;/SPAN&gt;])

search_result_HU = gis.content.search(&lt;SPAN style="color: #aa4926;"&gt;query&lt;/SPAN&gt;=&lt;SPAN style="color: #6a8759;"&gt;"title:Michael_10_12"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;item_type&lt;/SPAN&gt;=&lt;SPAN style="color: #6a8759;"&gt;"Feature Layer"&lt;/SPAN&gt;)
&lt;SPAN style="color: #8888c6;"&gt;print&lt;/SPAN&gt;(search_result_HU[&lt;SPAN style="color: #6897bb;"&gt;0&lt;/SPAN&gt;])

wm = WebMap()
wm.add_layer(search_result_HU[&lt;SPAN style="color: #6897bb;"&gt;0&lt;/SPAN&gt;]&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;options&lt;/SPAN&gt;={&lt;SPAN style="color: #6a8759;"&gt;'title'&lt;/SPAN&gt;: &lt;SPAN style="color: #6a8759;"&gt;'Hurricane'&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #6a8759;"&gt;'opacity'&lt;/SPAN&gt;: &lt;SPAN style="color: #6897bb;"&gt;0.5&lt;/SPAN&gt;})
wm.add_layer(search_result[&lt;SPAN style="color: #6897bb;"&gt;0&lt;/SPAN&gt;]&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;options&lt;/SPAN&gt;={&lt;SPAN style="color: #6a8759;"&gt;'title'&lt;/SPAN&gt;: &lt;SPAN style="color: #6a8759;"&gt;'Locations'&lt;/SPAN&gt;})
&lt;SPAN style="color: #8888c6;"&gt;print&lt;/SPAN&gt;(wm.definition)

output = mapping.export_map(&lt;SPAN style="color: #aa4926;"&gt;web_map_as_json&lt;/SPAN&gt;=wm&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #aa4926;"&gt;format&lt;/SPAN&gt;=&lt;SPAN style="color: #6a8759;"&gt;'PNG32'&lt;/SPAN&gt;)
&lt;SPAN style="color: #8888c6;"&gt;print&lt;/SPAN&gt;(&lt;SPAN style="color: #8888c6;"&gt;type&lt;/SPAN&gt;(output))&lt;/PRE&gt;&lt;P&gt;When calling the export_map, I am getting the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error executing tool. Export Web Map Task : 'mapOptions'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:08:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/export-web-map-to-image/m-p/881481#M5148</guid>
      <dc:creator>deleted-user-MOQmQl8Sb2hg</dc:creator>
      <dc:date>2021-12-12T11:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Export Web Map to image</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/export-web-map-to-image/m-p/881482#M5149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I solved my own issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I manually added the MapOptions and exportOptions to the webMap JSON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;webmapJSON = web_map_item.get_data()

webmapJSON.update(json.loads(&lt;SPAN style="color: #6a8759;"&gt;'''{"mapOptions" : { "extent" : {&amp;nbsp; "xmin":-88.55,&amp;nbsp; "ymin":17.55,&amp;nbsp; "xmax":-72.75,&amp;nbsp; "ymax":38.05,&amp;nbsp; "spatialReference" : {&amp;nbsp;&amp;nbsp; "wkid" : 4326&amp;nbsp; } }}}'''&lt;/SPAN&gt;))
webmapJSON.update(json.loads(&lt;SPAN style="color: #6a8759;"&gt;'''{"exportOptions": { "dpi" : 300, "outputSize" :&amp;nbsp; [1000,1000]}}'''&lt;/SPAN&gt;))&lt;/PRE&gt;&lt;P&gt;From here, you can call the export_map function and the image will be rendered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, beware that your layers must be marked public for this to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:08:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/export-web-map-to-image/m-p/881482#M5149</guid>
      <dc:creator>deleted-user-MOQmQl8Sb2hg</dc:creator>
      <dc:date>2021-12-12T11:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Export Web Map to image</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/export-web-map-to-image/m-p/881483#M5150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for sharing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 22:18:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/export-web-map-to-image/m-p/881483#M5150</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2018-10-22T22:18:53Z</dc:date>
    </item>
  </channel>
</rss>

