Class: WebPrintingJobLegendOptions

WebPrintingJobLegendOptions

Web 打印图例参数类。此类用于设置图例名称、图例元素等参数,图例元素可以是图例的URL地址、Base64 位图片信息、布局业务图层参数以及自定义图例元素参数等, 优先级:picAsBase64 > picAsUrl > customItems > layers,四者必选其一。

new WebPrintingJobLegendOptions(option)

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

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

参数。

Name Type Description
title string 可选

图例名称。

picAsUrl string 可选

图例的图片 URL 地址。

picAsBase64 string 可选

图例的 Base64 位图片信息。

layers WebPrintingJobLayers 可选

图例的布局业务图层参数类。

customItems WebPrintingJobCustomItems 可选

自定义图例元素参数类。

Version:
  • 10.1.0

Members

自定义图例元素参数类。

图例的布局业务图层参数类。

picAsBase64string

图例的 Base64 位图片信息。

picAsUrlstring

图例的图片 URL 地址。

titlestring

图例名称。

Methods

destroy()

common/iServer/WebPrintingJobLegendOptions.js, line 55

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

toJSON(){string}

common/iServer/WebPrintingJobLegendOptions.js, line 73

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

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