Class: BaiduTileLayer

BaiduTileLayer

百度地图图层类。

new BaiduTileLayer(url, options)

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

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

  L.supermap.baiduTileLayer(url, options);
</script>
leaflet/mapping/BaiduTileLayer.js, line 7
Name Type Default Description
url string 'https://maponline{num}.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles={styles}&udt=20150815&scaler=1' 可选

切片地址。

options Object

参数。

Name Type Default Description
minZoom number 3 可选

最小缩放级别。

maxZoom number 19 可选

最大缩放级别。

bounds L.LatLngBounds L.latLngBounds([-85.0511287798, -180],[85.0511287798, 180]) 可选

显示范围。

retina L.Browser L.Browser.retina 可选

浏览器显示分辨率。

tileProxy string 可选

服务代理地址。

bufferTiles number 0 可选

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

tileCache boolean false 可选

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

tileCacheZoomRange number 5 可选

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

maxOverzooming number 8 可选

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

maxUnderzooming number 3 可选

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

attribution string 'Map Data © 2018 Baidu - GS(2016)2089号 - Data © 长地万方' 可选

版权描述信息。

Extends

BaiduTileLayer -> L.TileLayer

Members

urlstring

切片地址。

Methods

getTileUrl(coords){string}

leaflet/mapping/BaiduTileLayer.js, line 56

获取切片地址。

Name Type Description
coords Object

行列号。

Returns:
Type Description
string 切片地址。