I need to create a new print widget, which does these (all together in one widget, or at least some of these):
1. Printing multiple maps, instead of one, where in each map a specific base map and sets of layers are used.
2. Changes the zoom extent for each print map.
3.User needs to upload a layer, e.g. project layer, which sometimes the length of the project is too long that we need to break the ma/player into different printing maps, how automatically we can split it into multiple prints at a certain extent (instead of zooming out to capture the whole layer)?
I know it seems a lot of work, but I appreciate it if someone can help me with this.
Hi, let me explain it more the first and second points (let's forget about the 3rd one for now):
Attached I show an example, where I, like always, print a map with the original basemap and a bunch of layers that are turned on. Then, I want to change the basemap and switch on and off other layers different from the first print and print it again, and finally, I want to print a map, let's say similar to the second print, but the basemap is changed again and it is zoomed in to a finer extent.
Clearly, I can do the whole thing manually by printing, then going and changing basemap, turning on/pff layers from layer list, and change the zoom. But how can I automate this process, such that when I click on print alll three PDFs are generated?
this requires you to write an arcpy based print service solution that will:
Sorry for the delay. It has been a crazy month. In case you didn't have any solution yet (or for other users from future):
How does it understand which basemaps and layers should be turned on and off? e.g. the layers are hosted in ESRI map, even some layers will be uploaded by users in WebApp.
That is the logic you need to have in the arcpy script.
A fairly easy way to get started to write arcpy based print service is to take a look at the python source code behind the Export Web Map tool in ArcGIS Pro.
At a high level, you need to do 3 things in your code:
Here are some arcpy functions/classes that will help you change a map's basemap layer, setting layers visibility, add layers etc.
Here is help on the ConvertWebMapToArcGISProject(...) function. It has some very useful samples too.
Also, check arcpy.mp.PDFDocumentXXXX(...) functions to find out who to open & append pages in a pdf file.
hope you will find this helpful.