Class: TiandituTileLayer

TiandituTileLayer

天地图图层类。

new TiandituTileLayer(options)

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

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

  L.supermap.tiandituTileLayer(options);
</script>
leaflet/mapping/TiandituTileLayer.js, line 9
Name Type Description
options Object

参数。

Name Type Default Description
url string 'https://t{s}.tianditu.gov.cn/{layer}_{proj}/wmts?' 可选

服务地址。

key string

天地图服务密钥。详见 https://lbs.tianditu.gov.cn/server/MapService.html

layerType string 'vec' 可选

图层类型。( vec: 矢量图层,img: 影像图层,ter: 地形图层)

style string 'default' 可选

图层风格。

format string 'tiles' 可选

格式。

isLabel boolean false 可选

是否是标注图层。

subdomains Array.<number> [0, 1, 2, 3, 4, 5, 6, 7] 可选

子域名数组。

attribution string 'Map Data <a href='https://www.tianditu.gov.cn' target='_blank'><img style='background-color:transparent;bottom:2px;opacity:1;' src='https://api.tianditu.gov.cn/img/map/logo.png' width='53px' height='22px' opacity='0'></a>' 可选

版权描述信息。

noWrap string true 可选

图层是否 X 方向平铺。

bufferTiles number 0 可选

视野外预加载的瓦片圈数。默认 0 表示不预加载;为 1 时上下左右各多加载一圈,可减少平移时的空白块。

tileCache boolean false 可选

是否启用客户端瓦片缓存。开启后缩放时优先使用已缓存瓦片填充,可避免放大、缩小、平移时的空白块。默认不启用。

tileCacheZoomRange number 5 可选

tileCache 为 true 时生效。缓存瓦片相对当前视野的缩放范围倍数。缓存上限为视野瓦片数 × tileCacheZoomRange。默认值为 5。

maxOverzooming number 8 可选

缩放时保留父级(更低级别)瓦片的深度,用于放大过程中的占位填充。

maxUnderzooming number 3 可选

缩放时保留子级(更高级别)瓦片的深度,用于缩小过程中的占位填充。

Extends

TiandituTileLayer -> WMTSLayer -> L.TileLayer

Methods

inherited getTileUrl(coords){string}

leaflet/mapping/TileLayer.WMTS.js, line 83

获取切片地址。

Name Type Description
coords Object

行列号。

Returns:
Type Description
string 切片地址。