Class: ImageCollectionService

ImageCollectionService

影像集合服务类。提供方法:获取影像集合的统计信息、图例信息、服务瓦片信息,获取、删除影像集合中的指定影像等。

new ImageCollectionService(url, options)

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

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

  L.supermap.imageCollectionService(url, options);
</script>
leaflet/services/ImageCollectionService.js, line 8
Name Type Description
url string

影像服务地址,如 http://{ip}:{port}/iserver/services/imageservice-hainan/restjsr 。

options Object

参数。

Name Type Description
collectionId string

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

proxy string 可选

服务代理地址。

withCredentials boolean 可选

请求是否携带凭据。默认情况下,仅同源请求包含凭据。

crossOrigin boolean 可选

是否允许跨域请求。

headers Object 可选

请求头。

Version:
  • 10.2.0
Example
new ImageCollectionService(url,options)
     .getLegend(queryParams, function(result){
         //doSomething
     })

Extends

ImageCollectionService -> ServiceBase -> L.Evented

Events

inherited destroy

leaflet/services/ServiceBase.js, line 58

资源释放成功后触发。

Properties:
Name Type Description
this ServiceBase

this 对象。

inherited initialized

leaflet/services/ServiceBase.js, line 45

构造函数构造成功后触发。

Properties:
Name Type Description
this ServiceBase

this 对象。

Methods

deleteItemByID(featureId, callback){Promise}

leaflet/services/ImageCollectionService.js, line 75

删除影像集合中指定 ID(featureId)的 Item 对象,即从影像集合中删除指定的影像。

Name Type Description
featureId string

Feature 的本地标识符。

callback RequestCallback 可选

回调函数,该参数未传时可通过返回的 promise 获取结果。

Returns:
Type Description
Promise Promise 对象。

inherited destroy()

leaflet/services/ServiceBase.js, line 53

释放资源,将引用的资源属性置空。

getItemByID(featureId, callback){Promise}

leaflet/services/ImageCollectionService.js, line 86

返回影像集合中指定 ID(featureId)的 Item 对象,即返回影像集合中指定的影像。

Name Type Description
featureId string

Feature 的本地标识符。

callback RequestCallback 可选

回调函数,该参数未传时可通过返回的 promise 获取结果。

Returns:
Type Description
Promise Promise 对象。

getLegend(queryParams, callback){Promise}

leaflet/services/ImageCollectionService.js, line 43

返回当前影像集合的图例信息。

Name Type Description
queryParams Object

query 参数。

Name Type Description
renderingRule ImageRenderingRule 可选

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

callback RequestCallback 可选

回调函数,该参数未传时可通过返回的 promise 获取结果。

Returns:
Type Description
Promise Promise 对象。

getStatistics(callback){Promise}

leaflet/services/ImageCollectionService.js, line 55

返回当前影像集合的统计信息。包括文件数量,文件大小等信息。

Name Type Description
callback RequestCallback 可选

回调函数,该参数未传时可通过返回的 promise 获取结果。

Returns:
Type Description
Promise Promise 对象。

getTileInfo(callback){Promise}

leaflet/services/ImageCollectionService.js, line 65

返回影像集合所提供的服务瓦片的信息,包括:每层瓦片的分辨率,比例尺等信息,方便前端进行图层叠加。

Name Type Description
callback RequestCallback 可选

回调函数,该参数未传时可通过返回的 promise 获取结果。

Returns:
Type Description
Promise Promise 对象。