Make your data accessible to ArcGIS Server.For more information on registering data with ArcGIS Server, see the following topics: This tutorial assumes you have a folder that is registered with ArcGIS Server. These will eventually be used as the staged map templates in the web application.īefore you do that, you need to make sure that a folder structure exists where ArcGIS Server can see the template map documents and data that will be used in the web application. The map templates in the ArcGIS Desktop installation directory to a new folder. If this is not the case, you may need to reinstall ArcGIS Desktop. ![]() This tutorial assumes the map templates and template data are present and have not been modified. This tutorial uses the MapTemplates and TemplateData folders in the ArcGIS Desktop installation directory, usually located at C:\Program Files (x86)\ArcGIS\Desktop (on 32-bit operating systems). To complete this tutorial, you should be familiar with the arcpy.mapping module, the ArcGIS API for JavaScript, ArcMap, and ArcGIS Server.You should also become familiar with printing in the web application help topics: The arcpy.mapping module also provides functionality to identify service layers and swap them out for layers that point to local data and to export to a variety of formats, for example, PDF. The staged templates can also contain other elements, such as a legend, dynamic text, and so on. Each template contains vector equivalents of all the possible layers in the map service. You will stage several templates from which the user can choose. The Python script uses the ConvertWebMapToMapDocument function in the arcpy.mapping module, which will insert the full state of the web map into a staged template map document. You will also create a Python script that will be published as a geoprocessing service that the Print Task will use. The ability to pass extra parameters into the Print Task is useful, as it allows you to collect any number of extra parameters from the web application. This tutorial will also show how to pass extra parameters into the Print Task, for example, whether to export georeferencing information to The code behind the Export Map button uses the ArcGIS API for JavaScript Print Task, which is available starting with ArcGIS 10.1 for Desktop and ArcGIS 10.1 for Server. ![]() Note that layers that were turned off in the Table of Contents and Legend in the web application are reflected in the output. ![]() Export the map to a printer-friendly format containing vector output for service layers.Ī sample output PDF is below.(That is, a layer can be on in the map and off in the legend.) Control which service sublayers are on/off in the legend in the output file.Control which service sublayers are on/off in the map.Choose whether to export georeferencing information toĪn output PDF file by passing in an extra parameter from the web application to the Print Task.In the web application, the end user will be able to: The illustration below shows a sample web GIS application using the ArcGIS API for JavaScript that you will create. Complexity: Advanced Data Requirement: Installed with software
0 Comments
Leave a Reply. |