new BaseSwipeTool(options)
tool/BaseSwipeTool.js, line 3
卷帘工具基类(当前仅支持 MapView leaflet 视图),用于对比前后景图层显示区域。
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
构造参数
|
Example
// ES5引入方式
const { BaseSwipeTool } = zondy.tool
// ES6引入方式
import { BaseSwipeTool } from "@mapgis/webclient-common"
Members
-
leadingLayersCollection.<Layer>
-
左侧或者上部图层列表,根据卷帘的模式调整。需要保证传入的图层上具备getContainer方法,当前不支持矢量图层进行卷帘
-
modeSwipeType
-
卷帘的模式。当前仅支持两种模式,'horizontal'水平和'vertical'垂直两种模式
-
regionNumber
-
区域信息,当region为0.5时,沿着水平卷帘或垂直卷帘方向50%的区域。当前值域范围为0-1
-
trailingLayersCollection.<Layer>
-
右侧或者下部图层列表,根据卷帘的模式调整。需要保证传入的图层上具备getContainer方法,当前不支持矢量图层进行卷帘
-
viewBaseView
-
视图对象
Methods
-
destroy()
tool/BaseSwipeTool.js, line 78 -
销毁工具实例
-
enable(enabled)
tool/BaseSwipeTool.js, line 73 -
开启或关闭卷帘
Name Type Description enabledBoolean