Class: WebPrintingJobContent

WebPrintingJobContent

Web 打印内容参数类。此类用于设置 Web 打印内容的类型、待打印 Web 地图的 URL 地址、JSON 表达等参数。
目前支持打印的 Web 内容为 WebMap,即:在线创建的地图。

new WebPrintingJobContent(option)

Usage
import { WebPrintingJobContent } from '@supermapgis/iclient-leaflet';

new WebPrintingJobContent(option);
<script type="text/javascript" src="https://iclient.supermap.io/dist/leaflet/iclient-leaflet.js"></script>
<script>
  new L.supermap.WebPrintingJobContent({paramsNames});
  // 弃用的写法
  new SuperMap.WebPrintingJobContent(option);
</script>
common/iServer/WebPrintingJobContent.js, line 6
Name Type Description
option Object

参数。

Name Type Description
type string

Web 打印内容支持的类型。目前支持的类型:WEBMAP。

url string 可选

待打印的 SuperMap iPortal WebMap 的 URL 地址。例如:http://supermapiportal:8190/iportal/web/maps/{mapid}/map.rjson 。

token string 可选

如果待打印的是 SuperMap iPortal 用户私有的 WebMap,需要提供 SuperMap iPortal 用户的 token。

value WebMapSummaryObject 可选

传递的是一个符合 SuperMap WebMap 规范的 WebMap 的 JSON 表达,也可以是一个完整的 SuperMap iPortal 数据上图制作的 WebMap 的 JSON 表达。如果已填了 URL 参数,此参数可不传。

Version:
  • 10.1.0

API Relations

As constructor parameter: WebPrintingJobParameters.

Members

tokenstring

如果待打印的是 SuperMap iPortal 用户私有的 WebMap,需要提供 SuperMap iPortal 用户的 token。

typestring

Web 打印内容支持的类型。目前支持的类型:WEBMAP。

urlstring

待打印的 SuperMap iPortal WebMap 的 URL 地址。

传递的是一个符合 SuperMap WebMap 规范的 WebMap 的 JSON 表达,也可以是一个完整的 SuperMap iPortal 数据上图制作的 WebMap 的 JSON 表达。

Methods

destroy()

common/iServer/WebPrintingJobContent.js, line 47

释放资源,将引用资源的属性置空。

toJSON(){string}

common/iServer/WebPrintingJobContent.js, line 58

将 WebPrintingJobContent 对象转化为 JSON 字符串。

Returns:
Type Description
string 转换后的 JSON 字符串。