Class: BaseSwipeTool

BaseSwipeTool

new BaseSwipeTool(options)

tool/BaseSwipeTool.js, line 3

卷帘工具基类(当前仅支持MapView leaflet视图)

Name Type Description
options Object

构造参数

Name Type Default Description
view BaseView 可选

视图对象,必传

leadingLayers Array.<Layer> [] 可选

左侧或者上部图层列表,根据卷帘的模式调整。在leaflet-plguin的MapView中使用时,矢量图层不支持卷帘

trailingLayers Array.<Layer> [] 可选

右侧或者下部图层列表,根据卷帘的模式调整。在leaflet-plguin的MapView中使用时,矢量图层不支持卷帘

region Number 可选

区域信息,当region为0.5时,沿着水平卷帘或垂直卷帘方向50%的区域。当前值域范围为0-1

mode SwipeType SwipeMode.hzorizontal 可选

卷帘的模式。当前仅支持两种模式,'horizontal'水平和'vertical'垂直两种模式

Members

leadingLayersCollection.<Layer>

左侧或者上部图层列表,根据卷帘的模式调整。需要保证传入的图层上具备getContainer方法,当前不支持矢量图层进行卷帘

modeSwipeType

卷帘的模式。当前仅支持两种模式,'horizontal'水平和'vertical'垂直两种模式

regionNumber

区域信息,当region为0.5时,沿着水平卷帘或垂直卷帘方向50%的区域。当前值域范围为0-1

trailingLayersCollection.<Layer>

右侧或者下部图层列表,根据卷帘的模式调整。需要保证传入的图层上具备getContainer方法,当前不支持矢量图层进行卷帘

viewBaseView

视图对象

Methods

destroy()

tool/BaseSwipeTool.js, line 72

销毁工具实例

enable(enabled)

tool/BaseSwipeTool.js, line 67

开启或关闭卷帘

Name Type Description
enabled Boolean