Class: FieldService

FieldService

字段服务类。提供方法:查询字段信息、查询字段统计信息等。

new FieldService(url, options)

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

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

数据服务地址,如 http://{ip}:{port}/iserver/services/data-world/rest/data 。

options Object

参数。

Name Type Description
proxy string 可选

服务代理地址。

withCredentials boolean 可选

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

crossOrigin boolean 可选

是否允许跨域请求。

headers Object 可选

请求头。

Example
new FieldService(url).getFields(function(result){
          //doSomething
     });

Extends

FieldService -> ServiceBase -> ol.Observable

Methods

getFields(params, callback){Promise}

openlayers/services/FieldService.js, line 32

字段查询服务。

Name Type Description
params FieldParameters

字段信息查询参数类。

callback RequestCallback 可选

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

Returns:
Type Description
Promise Promise 对象。

getFieldStatisticsInfo(params, callback){Promise}

openlayers/services/FieldService.js, line 43

字段统计服务。

Name Type Description
params FieldStatisticsParameters

字段统计信息查询参数类。

callback RequestCallback

回调函数。

Returns:
Type Description
Promise Promise 对象。