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 ),下载完成后,解压到某个目录(本 ...
随机推荐
- 二、通过工厂方法来配置bean
调用静态工厂方法创建 Bean是将对象创建的过程封装到静态方法中. 当客户端需要对象时, 只需要简单地调用静态方法, 而不同关心创建对象的细节. 要声明通过静态方法创建的 Bean, 需要在 Bean ...
- 当你的程序在朋友的机器上显示丢失msvcr100d.dll的时候
0. 给朋友发了个DEMO,收到提示:丢失 msvcr100d.dll 1. 一看是运行库文件,赶紧让朋友下载并安装vc++ 2010 redistribution,朋友反馈还是提示丢失这个dll文件 ...
- 从数组中找到topK的元素(序号)
问题: 在n个数中找出最大的k个数. 多次求min()或求max() 最简单的方法是对大小为k的数组进行n次求min计算(或者对大小为n的数组进行k次求max计算)最后能够找出最大k个数.复杂度是O( ...
- MySQL的简介
什么是数据库 1. 数据库(Database)是按照数据结构来组织.存储和管理数据的仓库,每个数据库都有一个或多个不同 的API(接口)用于创建,访问,管理,搜索和复制所保存的数据 2. 我们也可以将 ...
- 【人类观察所】"当代人"正经历的生活
一."即时满足"的互联网 "轻微烦躁,偶尔自燃,当代生活多数时刻的心情基调." 如果你出生于上个世纪,应该能明白木心的<从前慢>里的 「从前的日色变 ...
- MacBook Pro突然蓝牙突然消失
刚才想用蓝牙,发现蓝牙居然不可用,硬件信息也无法找到,分享一个方法:
- 文本段落缩进text-indent:2em
中文文字中的段前习惯空两个文字的空白,这个特殊的样式可以用下面代码来实现: p{text-indent:2em;} <p>1922年的春天,一个想要成名名叫尼克卡拉威(托比?马奎尔Tobe ...
- 加密算法极先锋之MD5算法
在开发过程中,避免不了要涉及到数据加密,比如用户账号密码的加密,用户敏感数据的加密,涉及到的加密算法种类繁多,作为拿来主义的开发者时间精力有限,能够清楚其中主流的加密算法和用途,就已经足够了. 主要的 ...
- js+vue、纯js 按条件分页
听说大牛都从博客开始的... 人狠话不多,翠花上酸菜代码: 有注解基本上都看的懂!但是自己还是要注意以下几点,免得以后再浪费时间. #.vue 中监听事件 v-on:change=“vueChange ...
- Apache Solr JMX服务 RCE 漏洞复现
Apache Solr JMX服务 RCE 漏洞复现 ps:Apache Solr8.2.0下载有点慢,需要的话评论加好友我私发你 0X00漏洞简介 该漏洞源于默认配置文件solr.in.sh中的EN ...