![]() ![]() Let's look into how we can customize those options for your applications and customers. All the export options were set to the defaults that were set when you installed the software. So far all the examples we've looked at have used ExportMXDToGeoPDF() to create our GeoPDF output. Turn mxd file into webmap Offline#Others might want multiple layers, full-resolution rasters and GIS data bundled for data exchange and offline searches. Some of your customers may want a flattened, lightweight version of your map for their mobile device. ![]() Using the export config options allows you to optimize the format of your GeoPDF creation. Further exploring GeoPDF creation options The next function printCompleted() is another callback function that is called when the GP task is complete, and it opens a new window with the GeoPDF in it. When the Print button is pressed by the user, it is called to create an HTTP request to your GP service. The next function after the highlighting is the print() callback function. To see the example in a browser on other machines, you will have to substitute the public domain name of your ArcGIS server. The domain of the printUrl is 'localhost:6080' which is the special domain name for the local machine and the default port number for ArcGIS server, but is only visible on the server. Note: this web page can be served locally or from any web server, but must be opened in a browser on your GIS server. First, it specifies the GP service on your server that will be called, then creates the PrintTask, and points the PrintParameters to the web page's map. The highlighted text shows setting up the PrintTask. PrintTask.execute(params, printComplete) Turn mxd file into webmap pdf#use the extent of the webmap in the output PDF when Print button is clicked, setup template and call print task # Use the uuid module to generate a GUID as part of the output name TemplateMxd = os.path.join(templatePath, (templateName '.mxd')) TemplatePath = r'C:\arcgisserver\TerraGo_Samples' #templatePath = r'C:\Program Files\ArcGIS\Server\Templates\ExportWebMapTemplates' # The template location in the server data store Web_Map_as_JSON = arcpy.GetParameterAsText(0) Import pubpy.geopdf_export.api as pubpy_ex Since this is going to require a few more lines of code, instead of typing everything in at the Python command line, let's create a Python script that brings all these considerations together: Making this work on server adds some complexity because ArcGIS Server requires the input MXD to be stored in a registered folder and the output GeoPDF file to be written to a folder that it has write privileges. Afterward, you can examine the output using Adobe Reader and the TerraGo Toolbar. You will have to provide your own MXD for C:\tmp\USA_Sample.mxd. Note: the output path cannot be relative, it must be absolute. Here we simply imported ArcPy and the export functions for PubPy, then called the ExportMXDToGeoPDF function with an existing MXD as input and a path to where we want to GeoPDF as output. > pubpy_ex.ExportMXDToGeoPDF(r'C:\tmp\USA_Sample.mxd', r'C:\tmp\MyFirstGeo.pdf') > import pubpy.geopdf_export.api as pubpy_ex ![]() Type 'help', 'copyright', 'credits' or 'license' for more information. Turn mxd file into webmap pro#Hi all - I am not a very sophisticated GIS user - started with MapInfo in the 1990s and moved to ESRI in about 2000 and have used ArcGIS Basic for a number of years, being able to make maps and do some basic analysis in water-groundwater - then came ArcGIS Pro - just trying to import MXD files isn't working and the online help is so rudimentary and makes it sounds so easy - but it DOES NOT work - then there are data source issues to locate files - I like to think I am at least average or above average intelligence but this experience with inadequate online help files is really frustrating - and searching ESRI Online Help for information on this give Zero Results - only Google can turn up some information - Am I the only one having this issue with transition from ArcGIC to ArcGIS Pro? Is there any REAL help out there ? I've got a bunch of maps I thought I would be able to smoothly import but that isn't work and basically makes the work I have done over the last several years worthless - Any sage advice? Kind Regards.Python 2.7.8 (default, Jun 30 2014, 16:03:49) on win32 ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |