AnsweredAssumed Answered

Export Web Map to image

Question asked by bryan.adams_ventusrisk on Oct 18, 2018
Latest reply on Oct 22, 2018 by simo

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?

 

search_result = gis.content.search(query="title:" + carrier + "_In-Force", item_type="Feature Layer")
print(search_result[0])

search_result_HU = gis.content.search(query="title:Michael_10_12", item_type="Feature Layer")
print(search_result_HU[0])

wm = WebMap()
wm.add_layer(search_result_HU[0], options={'title': 'Hurricane', 'opacity': 0.5})
wm.add_layer(search_result[0], options={'title': 'Locations'})
print(wm.definition)

output = mapping.export_map(web_map_as_json=wm, format='PNG32')
print(type(output))

When calling the export_map, I am getting the following error:

 

Error executing tool. Export Web Map Task : 'mapOptions'

Outcomes