Tutorial: Publishing additional services for printing
Complexity:IntermediateData Requirement:Use your own data
There may be occasions when you need to publish additional services for web printing, beyond the PrintingTools service included with ArcGIS for Server. For example, you could create a new service and configure it to point at your own folder of map layouts. Or you could publish one freely available service while making a more advanced service available for a fee.
To make your own service for printing, you need to publish a geoprocessing service with the Export Web Map tool. This tutorial will guide you through the process.
Registering your layout templates folder with ArcGIS for Server
During this tutorial, you will work with a folder of ArcMap documents (MXDs) that you have prepared with different layouts to be used for web map printing. This is your layout templates folder.
If your layout templates folder is currently on the server or accessible by the server, you should register the folder with ArcGIS for Server. See Registering your data with ArcGIS Server using ArcGIS for Desktop to learn how to register a folder with the server.
If you cannot get your layout templates folder onto the server or into a location accessible by the server, do nothing. The layout templates folder will be copied to the server at the time you publish the service, thereby ensuring the server can see the folder. Although this option is easier to configure, it takes more steps to update your layout templates in the future.
Preparing and publishing the service
The first step in publishing is to run the Export Web Map tool with the default values you want for your service. You will then publish the tool result as a geoprocessing service.
- In ArcCatalog or the Catalog window in ArcMap, navigate to Toolboxes > System Toolboxes > Server Tools > Printing.
- Double-click the Export Web Map tool to open it.
- Leave the Web Map as JSON parameter blank.
To get printable images, users of this service will submit their own web map JSON for this parameter. The printing widgets in the ArcGIS web APIs do the work of generating this JSON behind the scenes.
- Leave the default for the Output File parameter. Once you publish this tool to the server, the output will be placed in the server jobs directory.
- Supply the Layout Templates Folder parameter by clicking the browse button and browsing to the folder where your layouts are stored.
Tip:If you just want to reference the basic layouts installed with ArcGIS for Server, leave this parameter blank.
- Optionally, set the Layout Template parameter by choosing one of the layouts from the drop-down list. This will be the default layout when users run your service.
- Click OK to run the tool.
- Click Geoprocessing > Results to display the Results window.
- Expand Current Session, right-click the ExportWebMap result you just got, and click Share As > Geoprocessing Service.
- Choose Publish a service and click Next.
- Choose a connection to ArcGIS Server (or click the button to add a new one), and give your service a name. Then click Next.
- Choose the folder where this service will reside. You cannot publish into the existing System or Utilities folders. You must use your own folder or the root folder.
When you have finished selecting a folder, click Continue.
You are now viewing the Service Editor where you can do more preparatory work before publishing, such as setting available parameter choices for your service.
- Click Parameters and ensure the Execution Mode of the service is set to Synchronous. You can alternatively choose Asynchronous if you expect the requests to take more than a few seconds.
- On Service Editor, find the left panel where each tool parameter is listed (Web Map as JSON, Output File, Format, Layout Templates Folder, and Layout Template). Click each of these parameters and examine the defaults that are set. If you want to change the defaults, you need to go back to the Export Web Map tool dialog box and set the values there, as you did in the previous steps in this tutorial. You can hide a parameter completely from end users and force them to use the default by setting the parameter's Input mode to Constant value.
Caution:Due to a known limitation with the Export Web Map tool, you cannot filter the parameter choices available to end users.
- Use the Service Editor to set any other properties that you want for your service, such as the minimum and maximum number of instances that are allowed to run per machine.
- Click Publish to publish your service.
If you receive a warning about data being copied to the server, click OK. This just copies the default output image, which is not a significant amount of data.
- Verify that your service published correctly by browsing to it in Manager or the Services Directory.
Your new service can now be referenced in the printing widgets offered by the ArcGIS web APIs.
Updating the layout templates
If you want to update the layouts in your layout templates folder, the appropriate workflow is determined by whether you registered the layout templates folder with the server before publishing (see the previous section "Registering your layout templates with ArcGIS Server").
Updating the layout templates folder if you registered it with ArcGIS Server
If you registered your layout templates folder with the server, this means the server can see your layouts. If you make updates to the MXDs in the folder, your modified layouts will be immediately available. If you add a new layout to the templates folder, you will need to restart the printing service before you can access and use the layout.
Updating the layout templates folder if you did not register it with ArcGIS Server
If you did not register your layout templates folder with the server, the layouts were copied to the server at the time of publishing. You need to perform a service overwrite to update the templates on the server. Follow these steps to do the overwrite:
- In ArcMap, open the Export Web Map tool and run it using your desired default values as described in the previous section.
- Right-click the geoprocessing result and choose Share As > Geoprocessing Service.
- Choose the option Overwrite an existing service and click Next.
- Click the name of the service you want to overwrite and click Continue.
- On the Service Editor, verify that all the service properties are set to your liking (they should default to the properties you chose when you originally published the service). Then click Publish.
The options you choose overwrite all options set during the first publishing. The layout templates folder (including your updates) are copied to the server and replace the layout templates folder that was put there when you published the service originally.
Tutorial: Publishing additional services for printing的更多相关文章
- spring boot 打包方式 spring boot 整合mybaits REST services
<build> <sourceDirectory>src/main/java</sourceDirectory> <plugins> <plugi ...
- SOAP Binding: Difference between Document and RPC Style Web Services
SOAP Binding: Difference between Document and RPC Style Web Services 20FLARES Twitter 1Facebook 9Goo ...
- Gazebo機器人仿真學習探索筆記(七)连接ROS
中文稍后补充,先上官方原版教程.ROS Kinetic 搭配 Gazebo 7 附件----官方教程 Tutorial: ROS integration overview As of Gazebo 1 ...
- ROS教程
Learning ROS 学习ROS Depending on your learning style and preferences, you can take two approaches to ...
- The future of scripting in Unity
Recently we talked about Unity and WebGL . In that post we briefly spoke about how scripting works i ...
- JAVA FORK JOIN EXAMPLE--转
http://www.javacreed.com/java-fork-join-example/ Java 7 introduced a new type of ExecutorService (Ja ...
- maven学习(上)- 基本入门用法
一.下载及安装 1.1 下载maven 3.1.1 先到官网http://maven.apache.org/download.cgi 下载最新版本(目前是3.1.1 ),下载完成后,解压到某个目录(本 ...
- Maven的配置和使用(二)
Maven仓库 使用Maven带给我们一个比较直接的好处是管理jar包,这些jar包默认地址是在C:\Users\用户名.m2 目录下,我们来修改下这个地址: 现在自己想建立的仓库地址的路径下新建文件 ...
- maven基本用法
一.下载及安装 1.1 下载maven 3.1.1 先到官网http://maven.apache.org/download.cgi 下载最新版本(目前是3.1.1 ),下载完成后,解压到某个目录(本 ...
随机推荐
- ATL的GUI程序设计(前言)
前言 也许,你是一个顽固的SDK簇拥者: 也许,你对MFC抱着无比排斥的态度,甚至像我一样对它几乎一无所知: 也许,你符合上面两条,而且正在寻求着一种出路: 也许,你找到了一条出路--WTL,但是仍然 ...
- 使用IntelliJ IDEA创建Maven工程
1. 新建项目(点击“+ Create New Project”): 2. 选择Maven,不必选择项目骨架,直接点击Next 按钮即可: 3. 输入项目名称,选择项目位置,输入组织名称,模块名称,项 ...
- c++中的 static 关键字
注:若没有特指是 静态成员时,默认都是普通成员: 1 类中的普通成员 类中的成员变量 和 成员函数 是分开存储的.其中, 1)每个对象都有独立的成员变量:成员变量可以存储在 栈空间.堆空间.全局数据区 ...
- Trie(字典树)的侃侃
Trie是什么 ? 字典树 : 见名知意(在树上进行查询). 跟字典相关的必定与查询有密切的关系, 查询就需要一定的媒介作为支撑,树就为这种查询提供支撑. Trie做什么 ? 实现字符串快速检索的多叉 ...
- 从linux命令行分享文件:bashupload.com和transfer.sh
背景 传输文件是一个常见的需求,简单的做法是通过即时通讯工具,邮件,网盘完成. 但当分享或接收的一端为远程服务器,只有命令行可以操作时,一个能支持在命令行完成分享和下载的工具,就会省下不少麻烦. 下面 ...
- .gitignore配置规则
1.gitignore文件 在git中如果想忽略掉某个文件,不让这个文件提交到版本库中,可以使用修改 .gitignore 文件的方法.这个文件每一行保存了一个匹配的规则例如: # 此为注释 – 将被 ...
- [LeetCode] [链表] 相关题目总结
刷完了LeetCode链表相关的经典题目,总结一下用到的技巧: 技巧 哑节点--哑节点可以将很多特殊case(比如:NULL或者单节点问题)转化为一般case进行统一处理,这样代码实现更加简洁,优雅 ...
- linux的分区和文件系统
一.分区类型 主分区 总共最多能分四个 扩展分区 只能有一个,也算做主分区的一种,也就是说主分区加扩展分区最多有4个. 但是扩展分区不能存储数据和格式化,必须在划分成逻辑分区才能使用. 逻辑分区 逻辑 ...
- 学习css常用基本层级伪类属性选择器
常见的css选择器包含:常用选择器.基本选择器.层级选择器.伪类选择器.属性选择器,其中常用选择器分为:1.html选择符*{}//给页面上所有的标签设置模式:2.类选择符.hcls{}//给clas ...
- .net 用反射获取当前运行的程序集中的所有Controller与Action
public string InitPermission() { // 通过反射加载程序集 // var baseType = Assembly.LoadFile(@"G:\testproj ...