Class: InfoQuery

InfoQuery

信息查询类。

L.kqmap.services.InfoQuery(options, onsuccess, onfailed)

leaflet/services/InfoQuery.js, line 26
Name Type Description
options Object

信息查询的配置参数

Name Type Description
url String

服务器的url地址

startindex Number

请求返回结果的起始索引

layerId String

信息查询的图层ID

reqcount Number

请求返回结果的最大记录数

geoSRS String

传入图形的空间参考

outSRS String

输出结果图形的空间参考

geometry GeoJSONObject

查询范围的坐标

fields String

需要返回的字段,默认为返回所有字段

where String

查询条件,sql语句中的where子句

returnGeometry boolean

是否返回图形信息

onsuccess function

查询成功后执行的函数

onfailed function

查询失败后执行的函数

Example
var onsuccess = (response) => {}
var onfailed = (error) => {}
var options = {}
var geometry = {
            type: "Polygon",
            coordinates: [[[113.3135764880889375, 34.849194500411183], [113.3135764880889375, 30.227397652533841], [105.0957865707509325, 30.227397652533841], [105.0957865707509325, 34.849194500411183], [113.3135764880889375, 34.849194500411183]]]
        };
options.url = service_ip + "/KQGis/rest/services/china3857";
options.layerId = 2;
options.geometry = geometry;
options.fields = "OID, CODE, NAME, KANQDB_LENGTH, KANQDB_AREA";
var query = new L.kqmap.services.InfoQuery(options);
query.queryAsync(onsuccess, onfailed);

Extends

Methods

inherited queryAsync(onsuccess(), onfailed())

leaflet/services/QueryBase.js, line 48

查询请求,由子类实例化后调用。

Name Type Description
onsuccess() function

查询成功后处理函数。

onfailed() function

查询错误后处理函数。