Class: ChangeTileVersion

ChangeTileVersion

版本切换控件,支持 IE10 及以上。

new ChangeTileVersion(options)

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

new ChangeTileVersion(options);
<script type="text/javascript" src="https://iclient.supermap.io/dist/leaflet/iclient-leaflet.js"></script>
<script>
  new L.supermap.control.ChangeTileVersion({paramsNames});
  // 弃用的写法

  L.supermap.control.changeTileVersion(options);
</script>
leaflet/control/ChangeTileVersion.js, line 8
Name Type Description
options Object

参数。

Name Type Default Description
layer L.Layer

Leaflet Layer 对象。

position string 'topleft' 可选

控件位置继承自 Leaflet control。

title string 'switch tile version' 可选

鼠标滑过时提示。

tooltip string 'top' 可选

tooltip 提示显示位置 top | right | bottom | left。

collapsed boolean true 可选

是否折叠。

nextText string '+' 可选

下一个版本的按钮布局。

lastText string '-' 可选

上一个版本的按钮布局。

ico string 'v' 可选

控件显示的 logo。

orientation string 'horizontal' 可选

方向 horizontal|vertical。

switch boolean true 可选

是否显示上/下一个版本切换控件。

Example
new ChangeTileVersion({
     layer: baseLayer,
     position: "topleft",
     orientation: "horizontal"
 }).addTo(map);

API Relations

Returned by: ChangeTileVersion.nextTilesVersion , ChangeTileVersion.setToolTip , ChangeTileVersion.setVersionName.

Extends

ChangeTileVersion -> L.Control

Methods

getTileSetsInfo()

leaflet/control/ChangeTileVersion.js, line 157

获取切片集信息。

getValue()

leaflet/control/ChangeTileVersion.js, line 228

获取进度条的值。(注:进度条的值并不是版本号)。

getVersion()

leaflet/control/ChangeTileVersion.js, line 236

获取当前进度条的值对应的版本号。

lastTilesVersion()

leaflet/control/ChangeTileVersion.js, line 197

上一个版本。

nextTilesVersion(){ChangeTileVersion}

leaflet/control/ChangeTileVersion.js, line 178

下一个版本,首次调用该函数默认为无版本。

Returns:
Type Description
ChangeTileVersion ChangeTileVersion的实例对象。

removeLayer()

leaflet/control/ChangeTileVersion.js, line 170

移除绑定的地图图层。

setContent(version)

leaflet/control/ChangeTileVersion.js, line 76

设置版本信息。

Name Type Description
version Object

版本信息。

setLayer(layer)

leaflet/control/ChangeTileVersion.js, line 125

设置需要绑定的图层。

Name Type Description
layer TiledMapLayer

绑定的图层。

setToolTip(tooltip){ChangeTileVersion}

leaflet/control/ChangeTileVersion.js, line 101

设置提示信息。

Name Type Description
tooltip HTMLElement | string

提示信息。

Returns:
Type Description
ChangeTileVersion ChangeTileVersion的实例对象。

setVersionName(content){ChangeTileVersion}

leaflet/control/ChangeTileVersion.js, line 86

设置版本号。

Name Type Description
content string

版本信息。

Returns:
Type Description
ChangeTileVersion ChangeTileVersion的实例对象。

tilesVersion(version)

leaflet/control/ChangeTileVersion.js, line 210

请求指定版本。

Name Type Description
version string

版本号参数。

update(tileVersions)

leaflet/control/ChangeTileVersion.js, line 147

更新缓存切片集和进度条长度。

Name Type Description
tileVersions number

待更新的切片版本号。

updateLength(length)

leaflet/control/ChangeTileVersion.js, line 112

更新进度条长度。

Name Type Description
length number

进度长度参数。