Class: TiandituTileLayer

TiandituTileLayer

天地图图层类。

new TiandituTileLayer(options)

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

// ES6 Import
import { TiandituTileLayer } from '@supermap/iclient-leaflet';

new TiandituTileLayer(options);

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 方向平铺。

Extends

Methods

inherited getTileUrl(coords){string}

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

获取切片地址。

Name Type Description
coords Object

行列号。

Returns:
Type Description
string 切片地址。