L.supermap.tiledMapLayer(url, options)
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
string |
The url of tiled map layer. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
The url of tiled map layer.
|
Fires
- L.supermap.tiledMapLayer#event:tilesetsinfoloaded
- L.supermap.tiledMapLayer#event:tileversionschanged
Example
L.supermap.tiledMapLayer(url).addTo(map);
Extends
Events
-
tilesetsinfoloaded
TiledMapLayer.js, line 186 -
Triggered after the tile set information is set.
Properties:
Name Type Description tileVersions
Array.<Object> Tile set information.
-
tileversionschanged
TiledMapLayer.js, line 237 -
Triggered after the sliced version is switched and redrawn successfully.
Properties:
Name Type Description tileVersion
Object This version of the slice.
Methods
-
changeTilesVersion()
TiledMapLayer.js, line 215 -
Switch to a version of the tile and redraw. Save the version index that needs to switch by this.tempIndex.
-
getScale(zoom){number}
TiledMapLayer.js, line 109 -
Get the scale value according to the zoom level.
Name Type Description zoom
number The zoom level.
Returns:
Type Description number The scale value. -
getScaleFromCoords(coords){number}
TiledMapLayer.js, line 122 -
Get the scale value according to ranks number.
Name Type Description coords
Object Ranks number.
Returns:
Type Description number The scale value. -
getTileUrl(coords){string}
TiledMapLayer.js, line 92 -
Get the URL of the tile according to ranks number.
Name Type Description coords
Object Ranks number.
Returns:
Type Description string The URL of the tile. -
lastTilesVersion()
TiledMapLayer.js, line 197 -
Request tiles of last version and redraw.
-
mergeTileVersionParam(version){boolean}
TiledMapLayer.js, line 258 -
Change the tile version number in the request URL parameter and redraw.
Name Type Description version
string The tile version number.
Returns:
Type Description boolean Whether it is successful. -
nextTilesVersion()
TiledMapLayer.js, line 206 -
Request tiles of next version and redraw.
-
setTileSetsInfo(tileSets)
TiledMapLayer.js, line 173 -
Set tilesets information.
Name Type Description tileSets
Object The tilesets object.
-
updateCurrentTileSetsIndex(index)
TiledMapLayer.js, line 249 -
Manually set the current tile set index. currently it is mainly used for control.
Name Type Description index
number The index.