Class: SetLayerStatusParameters

SetLayerStatusParameters

子图层显示控制参数类,该类存储了各子图层是否可见的状态。 注意在 SuperMap iClient 系列产品中所说的图层与 SuperMap Deskpro 的地图对应,子图层与 SuperMap Deskpro 的图层对应。

new SetLayerStatusParameters(options)

Usage
// 浏览器
<script type="text/javascript" src="https://iclient.supermap.io/dist/mapboxgl/iclient-mapboxgl.js"></script>
<script>
  new mapboxgl.supermap.SetLayerStatusParameters(options);
  
  // 弃用的写法
  new SuperMap.SetLayerStatusParameters(options);

</script>

// ES6 Import
import { SetLayerStatusParameters } from '@supermap/iclient-mapboxgl';

new SetLayerStatusParameters(options);

common/iServer/SetLayerStatusParameters.js, line 6
Name Type Description
options Object

参数。

Name Type Default Description
layerStatusList Array.<LayerStatus>

获取或设置图层可见状态(LayerStatus)集合, 集合中的每个 LayerStatus 对象代表一个子图层的可视状态。

holdTime number 15 可选

获取或设置资源在服务端保存的时间。

resourceID string 可选

获取或设置资源服务 ID。

Members

holdTimenumber

获取或设置资源在服务端保存的时间。单位为分钟。

Default Value:
15

layerStatusListArray.<LayerStatus>

获取或设置图层可见状态(LayerStatus)集合,集合中的每个 LayerStatus 对象代表一个子图层的可视状态。

resourceIDstring

获取或设置资源服务ID。如果设置该参数则会在指定的 TempLayer 中进行图层的显示控制; 如果不设置该参数,则会首先创建一个 TempLayer ,然后在新创建的 TempLayer 中进行图层的显示控制。

Methods

destroy()

common/iServer/SetLayerStatusParameters.js, line 48

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

toJSON(){Object}

common/iServer/SetLayerStatusParameters.js, line 59

生成 JSON。

Returns:
Type Description
Object 对应的 JSON 对象。