Select to view content in your preferred language

Using the mapping.export_map

2702
5
Jump to solution
02-07-2017 12:51 PM
RichardHughes2
Frequent Contributor

I am writing a print service for client that does not have ArcServer because they are small and are using only ArcGIS Online as their mapping platform.  Since I cannot use the ArcServer print services, I've utilized the python api in a django app to generate the map print and return the document to browser.  It works well in web app builder, but when I download the app to IIS and hook it up with the proxy, the Export Map Task returns errors that it is unable to create layers.  The error is basically identical to the issue when using the Print Service in the jsapi on a web map running through the proxy.  Is the proxy still going to cause an issue with creating the print even though the python api is using the GIS object with credentials to run the Export Map Task?  My other option is to use ArcPro python library and export the map, but will the proxy still cause issues?  If so, what can I do?  Our client really needs to print and we want their organization to fall in love with esri.

Thanks,

Rich

Tags (1)
1 Solution

Accepted Solutions
RichardHughes2
Frequent Contributor

So as a follow-up to this, I am able to use the export_map() method in the esri python api to generate the map print by adding the token to the operational layers that needed it and no more.

View solution in original post

0 Kudos
5 Replies
RichardHughes2
Frequent Contributor

As a progression on this topic, I've reviewed the Export Web Map Task Specification for the web map json and see that each of the operational layers should have a short-lived token assigned to the token property of the layer.  Today I am going to try and create a short lived token with AGOL and add it to the operational layer in the web map json before submitting it to the mapping.export_map() method.

0 Kudos
RichardHughes2
Frequent Contributor

Does Esri allow printing from ArcPro or ArcMap on a web server?  I need to print maps without server and using AppLogin.  Going to ArcServer is overkill in cost and scope of the project.  Does anyone have any ideas on how to print in this type of situation?

0 Kudos
RichardHughes2
Frequent Contributor

So as a follow-up to this, I am able to use the export_map() method in the esri python api to generate the map print by adding the token to the operational layers that needed it and no more.

0 Kudos
LocationArtistry
New Contributor

Can you please provide an example?  They do not provide a full example in the docs at: arcgis.mapping module — arcgis 1.8.2 documentation 

Just the function and the arguments, which makes it difficult.  

I am trying to determine how I would format the json request within to execute this function/method in the Python API.

Thanks!

0 Kudos