Class: changeTileVersion

changeTileVersion

The tile version control class. It is used to switching tiles of layers in different versions. Currently it supports IE 10+ (include IE10)

L.supermap.control.changeTileVersion(options)

ChangeTileVersion.js, line 5
Name Type Description
options Object

The optional parameters of changeTileVersion control.

Name Type Default Description
layer L.Layer

The target base map layer to be associated with the control.

position string 'topleft' optional

the position of the control,inheriting from leaflet control.

title string 'switch tile version' optional

The Hint when the mouse slid over.

tooltip string 'top' optional

The location of the tooltip top | right | bottom | left.

collapsed boolean true optional

Whether collapsed or not.

nextText string '+' optional

Button layout for the next version.

lastText string '-' optional

Button layout for the last version.

ico string 'v' optional

Logo of control display.

orientation string 'horizontal' optional

The orientation horizontal|vertical.

switch boolean true optional

Whether to display the last/next version of the switch control.

Example
L.supermap.control.changeTileVersion({
     layer: baseLayer,
     position: "topleft",
     orientation: "horizontal"
 }).addTo(map);

Extends

changeTileVersion -> L.Control

Methods

getTileSetsInfo()

ChangeTileVersion.js, line 151

Get the tile set information.

getValue()

ChangeTileVersion.js, line 222

Get the value of the progress bar. Note: (the value of the progress bar is not the version number).

getVersion()

ChangeTileVersion.js, line 230

Get the version number corresponding to the current progress bar.

lastTilesVersion()

ChangeTileVersion.js, line 191

Get the last tile version.

nextTilesVersion(){this}

ChangeTileVersion.js, line 172

Get the next tile version. No addition and subtraction in the first acquisition, it is a non version state.

Returns:
Type Description
this this.

removeLayer()

ChangeTileVersion.js, line 164

Remove the target layer associated with the control.

setContent(version)

ChangeTileVersion.js, line 69

Set up version related information.

Name Type Description
version Object

the version information.

setLayer(layer)

ChangeTileVersion.js, line 119

Associate the control with the target layer.

Name Type Description
layer L.supermap.tiledMapLayer

The layer to be associated with.

setToolTip(tooltip){this}

ChangeTileVersion.js, line 94

Set up the tool tip information.

Name Type Description
tooltip HTMLElement | String

The tool tip information to be set up.

Returns:
Type Description
this this

setVersionName(content){this}

ChangeTileVersion.js, line 79

Set the version name.

Name Type Description
content string

The version information.

Returns:
Type Description
this this

tilesVersion(version)

ChangeTileVersion.js, line 204

Request the version according to the specified version number.

Name Type Description
version string

The version number parameters.

update(tileVersions)

ChangeTileVersion.js, line 141

Update the cache tile set and the length of the progress bar.

Name Type Description
tileVersions number

The tile version number to be updated.

updateLength(length)

ChangeTileVersion.js, line 105

Update the length of the progress bar.

Name Type Description
length number

The length of the progress bar.