Namespace: Util

Util

工具类。

Usage
// 浏览器
<script type="text/javascript" src="https://iclient.supermap.io/dist/openlayers/iclient-ol.js"></script>
<script>
  const result = ol.supermap.Util.getOlVersion();

</script>

// ES6 Import
import { Util } from '@supermap/iclient-ol';

const result = Util.setMask();

Methods

setMask(layers, polygon)

openlayers/core/Util.js, line 388

为图层设置掩膜。

Name Type Description
layers ol.layer.Layer | Array.<ol.layer.Layer>

图层

polygon ol.geom.Geometry | ol.Feature

掩膜矢量要素,支持面类型的要素。

Version:
  • 10.1.0

unsetMask(layers)

openlayers/core/Util.js, line 437

取消图层掩膜。

Name Type Description
layers ol.layer.Layer | Array.<ol.layer.Layer>

图层

Version:
  • 10.1.0