Class: ImageService

ImageService

影像服务类。可实现大规模影像或栅格数据的管理,提供方法: 获取影像集合列表、获取影像集合中指定 ID 的影像、根据过滤条件查询匹配的影像数据。

new ImageService(url, options)

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

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

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

options Object

参数。

Name Type Description
proxy string 可选

服务代理地址。

withCredentials boolean 可选

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

crossOrigin boolean 可选

是否允许跨域请求。

headers Object 可选

请求头。

Version:
  • 10.2.0
Example
ImageService(url,options).getCollections(function(result){
         //doSomething
     })

Extends

ImageService -> ServiceBase -> ol.Observable

Methods

getCollectionByID(collectionId, callback){Promise}

openlayers/services/ImageService.js, line 49

ID 值等于collectionId参数值的影像集合(Collection)。ID 值用于在服务中唯一标识该影像集合。

Name Type Description
collectionId string

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

callback RequestCallback 可选

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

Returns:
Type Description
Promise Promise 对象。

getCollections(callback){Promise}

openlayers/services/ImageService.js, line 39

返回当前影像服务中的影像集合列表(Collections)。

Name Type Description
callback RequestCallback 可选

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

Returns:
Type Description
Promise Promise 对象。
openlayers/services/ImageService.js, line 60

查询与过滤条件匹配的影像数据。

Name Type Description
itemSearch ImageSearchParameter 可选

查询参数。

callback RequestCallback 可选

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

Returns:
Type Description
Promise Promise 对象。