<?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: how to generate 'web_map_as_json' string from a web map in python in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-generate-web-map-as-json-string-from-a-web/m-p/768960#M613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seemed to do the trick:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wm_as_json = json.loads(str(wm.definition))&lt;BR /&gt;wm_as_json['mapOptions'] = json.loads('''{ "extent" : { "xmin":-88.55, "ymin":17.55, "xmax":-72.75, "ymax":38.05, "spatialReference" : { "wkid" : 4326 } }}''')&lt;BR /&gt;wm_as_json['exportOptions'] = json.loads('''{ "dpi" : 300, "outputSize" : [1000,1000]}''')&lt;/P&gt;&lt;P&gt;mapping.export_map(webmap_as_json=wm_as_json)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 03 Apr 2020 12:29:27 GMT</pubDate>
    <dc:creator>artzaifman</dc:creator>
    <dc:date>2020-04-03T12:29:27Z</dc:date>
    <item>
      <title>how to generate 'web_map_as_json' string from a web map in python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-generate-web-map-as-json-string-from-a-web/m-p/768958#M611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking for explanation of how to generate "web_map_as_json" string as the argument to mapping.export_map()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2020 03:02:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-generate-web-map-as-json-string-from-a-web/m-p/768958#M611</guid>
      <dc:creator>artzaifman</dc:creator>
      <dc:date>2020-04-03T03:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate 'web_map_as_json' string from a web map in python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-generate-web-map-as-json-string-from-a-web/m-p/768959#M612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This link&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.mapping.html?highlight=web_map_as_json#arcgis.mapping.export_map" title="https://developers.arcgis.com/python/api-reference/arcgis.mapping.html?highlight=web_map_as_json#arcgis.mapping.export_map"&gt;arcgis.mapping module — arcgis 1.8.0 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refers yo to the documentation in arcgis help topics&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/web-map-printing-with-arcpy-mp.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/web-map-printing-with-arcpy-mp.htm"&gt;Web map printing with arcpy.mp—ArcPy | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which has some stuff to read, and maybe the section on&lt;/P&gt;&lt;H3 style="color: #4c4c4c; background-color: #ffffff; font-weight: 300; font-size: 1.69949rem; margin: 0px 0px 1.55rem;"&gt;&lt;SPAN style="font-size: 15px;"&gt;Understand web map JSON&lt;/SPAN&gt;&lt;/H3&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;would help&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2020 03:18:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-generate-web-map-as-json-string-from-a-web/m-p/768959#M612</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-04-03T03:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate 'web_map_as_json' string from a web map in python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-generate-web-map-as-json-string-from-a-web/m-p/768960#M613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seemed to do the trick:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wm_as_json = json.loads(str(wm.definition))&lt;BR /&gt;wm_as_json['mapOptions'] = json.loads('''{ "extent" : { "xmin":-88.55, "ymin":17.55, "xmax":-72.75, "ymax":38.05, "spatialReference" : { "wkid" : 4326 } }}''')&lt;BR /&gt;wm_as_json['exportOptions'] = json.loads('''{ "dpi" : 300, "outputSize" : [1000,1000]}''')&lt;/P&gt;&lt;P&gt;mapping.export_map(webmap_as_json=wm_as_json)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Apr 2020 12:29:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-generate-web-map-as-json-string-from-a-web/m-p/768960#M613</guid>
      <dc:creator>artzaifman</dc:creator>
      <dc:date>2020-04-03T12:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate 'web_map_as_json' string from a web map in python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-generate-web-map-as-json-string-from-a-web/m-p/1387005#M9685</link>
      <description>&lt;P&gt;I have recently had to solve this problem.&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/79193"&gt;@artzaifman&lt;/a&gt;'s answer was a good help, but it wasn't clear on how to find the webmap item in a Portal environment. Here is an updated version:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;# find webmap in portal&lt;BR /&gt;webmap_item_id = "YOUR_WEBMAP_ITEM_ID_HERE"&lt;BR /&gt;gis = GIS(url=YOUR_PORTAL_URL_HERE, token=YOUR_TOKEN_HERE)&lt;BR /&gt;webmap = gis.content.get(webmap_item_id)&lt;BR /&gt;webmap_as_json = webmap.get_data()&lt;/P&gt;&lt;P&gt;# convert webmap to aprx&lt;BR /&gt;webmap_as_json['mapOptions'] = {'extent':webmap_data['initialState']['viewpoint']['targetGeometry']}&lt;BR /&gt;webmap_as_json['exportOptions'] = json.loads('{ "dpi" : 300, "outputSize" : [1000,1000]}')&lt;BR /&gt;result = arcpy.mp.ConvertWebMapToArcGISProject(webmap_as_json)&lt;BR /&gt;aprx = result.ArcGISProject&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 20:06:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-generate-web-map-as-json-string-from-a-web/m-p/1387005#M9685</guid>
      <dc:creator>ANH</dc:creator>
      <dc:date>2024-02-26T20:06:56Z</dc:date>
    </item>
  </channel>
</rss>

