Class: GridCellInfosService

GridCellInfosService

数据栅格查询服务类。此类用于设置查询某一地理位置所对应栅格单元信息的相关参数,包括:栅格值、栅格行、栅格列等。

new GridCellInfosService(url, options)

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

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

  L.supermap.gridCellInfosService(url, options);
</script>
leaflet/services/GridCellInfosService.js, line 8
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 GridCellInfosService(url)
     .getGridCellInfos(param,function(result){
          //doSomething
     })

Extends

GridCellInfosService -> 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

inherited destroy()

leaflet/services/ServiceBase.js, line 53

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

getGridCellInfos(params, callback){Promise}

leaflet/services/GridCellInfosService.js, line 40

获取某一地理位置所对应的栅格单元信息。

Name Type Description
params GetGridCellInfosParameters

数据服务栅格查询参数类。

callback RequestCallback 可选

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

Returns:
Type Description
Promise Promise 对象。