Class: ImageTileLayer

ImageTileLayer

SuperMap iServer 影像服务图层源。根据影像集合的过滤条件、显示风格等请求参数,返回指定的影像数据栅格瓦片并渲染。

new ImageTileLayer(url, options)

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

// ES6 Import
import { ImageTileLayer } from '@supermapgis/iclient-leaflet';

new ImageTileLayer(url, options);

leaflet/mapping/ImageTileLayer.js, line 10
Name Type Description
url string

服务地址,例如: http://{ip}:{port}/iserver/{imageservice-imageserviceName}/restjsr/

options Object

参数。

Name Type Default Description
collectionId string

影像集合(Collection)的 ID,在一个影像服务中唯一标识影像集合。

sqlFilter string 可选

对所显示影像的过滤条件。相当于 SQL 查询中的 where 子句。支持 st_geometry 空间函数过滤。11.0 版本暂不支持通过 ECQL 进行过滤。

renderingRule ImageRenderingRule 可选

指定影像显示的风格,包含拉伸显示方式、颜色表、波段组合以及应用栅格函数进行快速处理等。不指定时,使用发布服务时所配置的风格。

ids Array.<number> 可选

返回影像集合中指定 ID 的影像,该 ID 为系统维护的一个自增 ID,为 SuperMap SDX 引擎的 SmID 字段内容。

names Array.<string> 可选

返回影像集合中指定名称影像的瓦片资源。影像名称包含文件后缀,如 S-60-45.tif。

format string 'png' 可选

瓦片表述类型,瓦片格式目前支持 png、jpg 和 webp 三种格式。

transparent boolean true 可选

瓦片是否透明。默认透明。

cacheEnabled boolean true 可选

是否启用缓存。

attribution string 'Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' title='SuperMap iServer' target='_blank'>SuperMap iServer</a></span>' 可选

版权描述信息。

subdomains Array.<number> 可选

子域名数组。

tileProxy string 可选

服务代理地址。

Version:
  • 10.2.0
Example
new ImageTileLayer(url,{collectionId:'xxx'}).addTo(map);

Extends

Methods

getTileUrl(coords){string}

leaflet/mapping/ImageTileLayer.js, line 67

根据行列号获取瓦片地址。

Name Type Description
coords Object

行列号。

Returns:
Type Description
string 瓦片地址。