Class: ImageCollectionService

ImageCollectionService

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

new ImageCollectionService(url, options)

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

new ImageCollectionService(url, options);
<script type="text/javascript" src="https://iclient.supermap.io/dist/openlayers/iclient-ol.js"></script>
<script>
  new ol.supermap.ImageCollectionService({paramsNames});
</script>
openlayers/services/ImageCollectionService.js, line 7
Name Type Description
url string

影像服务地址。例如: http://{ip}:{port}/iserver/{imageservice-imageserviceName}/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 -> ol.Observable

Methods

deleteItemByID(featureId, callback){Promise}

openlayers/services/ImageCollectionService.js, line 72

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

Name Type Description
featureId string

Feature 的本地标识符。

callback RequestCallback 可选

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

Returns:
Type Description
Promise Promise 对象。

getItemByID(featureId, callback){Promise}

openlayers/services/ImageCollectionService.js, line 83

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

Name Type Description
featureId string

Feature 的本地标识符。

callback RequestCallback 可选

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

Returns:
Type Description
Promise Promise 对象。

getLegend(queryParams, callback){Promise}

openlayers/services/ImageCollectionService.js, line 40

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

Name Type Description
queryParams Object

query 参数。

Name Type Description
renderingRule ImageRenderingRule 可选

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

callback RequestCallback 可选

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

Returns:
Type Description
Promise Promise 对象。

getStatistics(callback){Promise}

openlayers/services/ImageCollectionService.js, line 52

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

Name Type Description
callback RequestCallback 可选

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

Returns:
Type Description
Promise Promise 对象。

getTileInfo(callback){Promise}

openlayers/services/ImageCollectionService.js, line 62

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

Name Type Description
callback RequestCallback 可选

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

Returns:
Type Description
Promise Promise 对象。