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.

Steps:
  1. In ArcCatalog or the Catalog window in ArcMap, navigate to Toolboxes > System Toolboxes > Server Tools > Printing.
  2. Double-click the Export Web Map tool to open it.
  3. 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.

  4. 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.
  5. 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.

  6. 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.
  7. Click OK to run the tool.
  8. Click Geoprocessing > Results to display the Results window.
  9. Expand Current Session, right-click the ExportWebMap result you just got, and click Share As > Geoprocessing Service.
  10. Choose Publish a service and click Next.
  11. Choose a connection to ArcGIS Server (or click the button to add a new one), and give your service a name. Then click Next.
  12. 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.

  13. 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.
  14. 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.

  15. 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.
  16. 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.

  17. 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:

Steps:
  1. In ArcMap, open the Export Web Map tool and run it using your desired default values as described in the previous section.
  2. Right-click the geoprocessing result and choose Share As > Geoprocessing Service.
  3. Choose the option Overwrite an existing service and click Next.
  4. Click the name of the service you want to overwrite and click Continue.
  5. 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的更多相关文章

  1. spring boot 打包方式 spring boot 整合mybaits REST services

    <build> <sourceDirectory>src/main/java</sourceDirectory> <plugins> <plugi ...

  2. SOAP Binding: Difference between Document and RPC Style Web Services

    SOAP Binding: Difference between Document and RPC Style Web Services 20FLARES Twitter 1Facebook 9Goo ...

  3. Gazebo機器人仿真學習探索筆記(七)连接ROS

    中文稍后补充,先上官方原版教程.ROS Kinetic 搭配 Gazebo 7 附件----官方教程 Tutorial: ROS integration overview As of Gazebo 1 ...

  4. ROS教程

    Learning ROS 学习ROS Depending on your learning style and preferences, you can take two approaches to ...

  5. The future of scripting in Unity

    Recently we talked about Unity and WebGL . In that post we briefly spoke about how scripting works i ...

  6. JAVA FORK JOIN EXAMPLE--转

    http://www.javacreed.com/java-fork-join-example/ Java 7 introduced a new type of ExecutorService (Ja ...

  7. maven学习(上)- 基本入门用法

    一.下载及安装 1.1 下载maven 3.1.1 先到官网http://maven.apache.org/download.cgi 下载最新版本(目前是3.1.1 ),下载完成后,解压到某个目录(本 ...

  8. Maven的配置和使用(二)

    Maven仓库 使用Maven带给我们一个比较直接的好处是管理jar包,这些jar包默认地址是在C:\Users\用户名.m2 目录下,我们来修改下这个地址: 现在自己想建立的仓库地址的路径下新建文件 ...

  9. maven基本用法

    一.下载及安装 1.1 下载maven 3.1.1 先到官网http://maven.apache.org/download.cgi 下载最新版本(目前是3.1.1 ),下载完成后,解压到某个目录(本 ...

随机推荐

  1. ubuntu 如何添加alias

    公司的nx 上面一般使用gvim 编辑文件.并且为gvim 增加了alias,只要敲 g 就是gvim 的意思,这样编辑一个文件只需要 g xxx.v 就可以了.非常方便. 在自己电脑上安装了ubun ...

  2. Face-anti-spoofing实验记录(通过val_public_list.txt制作val数据集)

    https://sites.google.com/qq.com/chalearnfacespoofingattackdete/contest-details 数据集官方获取网站 网友总结 https: ...

  3. 给Hangfire的webjob增加callback和动态判断返回结果功能设计

    背景介绍 通常业务中需要用到定时执行功能,我用hangfire搭建了一个调度服务,这个调度服务是独立于业务逻辑的,具体可以参考文章:https://github.com/yuzd/Hangfire.H ...

  4. Go语言实现:【剑指offer】删除链表中重复的结点

    该题目来源于牛客网<剑指offer>专题. 给定一个排序链表,删除所有含有重复数字的节点,只保留原始链表中没有重复出现的数字. 示例 1: 输入: 1->2->3->3- ...

  5. Linux 配置 DNS

    这里不讨论如何在linux上搭建一台DNS服务器: 这里讨论的是 配置 linux系统,让其能够解析域名,使用户可以流畅使用Internet 先了解几个文件,位于/etc目录下的有:hosts,hos ...

  6. 1163 - Bank Robbery

    1163 - Bank Robbery   In one very cold morning, Mark decides to rob a bank. But while trying hacking ...

  7. 【全集】IDEA入门到实战

    课程介绍   IDEA是一款功能强悍.非常好用的Java开发工具,近几年编程开发人员对IDEA情有独钟.虽然IDEA功能很强大,但目前市面讲解的不细致.不系统,导致很多IDEA初学者要么无从下手,要么 ...

  8. OpenCV3入门(十)图像轮廓

    1.图像轮廓 1.1图像轮廓与API函数 轮廓是一系列相连的点组成的曲线,代表了物体的基本外形,相对于边缘,轮廓是连续的,边缘并不全部连续.一般地,获取图像轮廓要经过下面几个步骤: 1)     读取 ...

  9. Blend 修改TreeViewItem样式

    Blend 修改TreeViewItem样式 1.用Blend for Visual Studio 2019 新建Wpf项目,拖动一个TreeView控件到Grid上 <Grid> < ...

  10. AndroidStudio中使用XML和Java代码混合控制UI界面实现QQ相册照片列表页面

    场景 效果 注: 博客: https://blog.csdn.net/badao_liumang_qizhi 关注公众号 霸道的程序猿 获取编程相关电子书.教程推送与免费下载. 实现 新建Androi ...