L.kqmap.services.GeometryOverlap(options, onsuccess, onfailed){Promise.<TResult>}
leaflet/services/GeometryOverlap.js, line 22
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
查询的配置参数
|
||||||||||||||||||
onsuccess |
function |
查询成功后执行的函数 |
||||||||||||||||||
onfailed |
function |
查询失败后执行的函数 |
Returns:
Type | Description |
---|---|
Promise.<TResult> |
Example
var onsuccess = (response) => {}
var onfailed = (error) => {}
var options = {}
options.url = service_ip + "/KQGis/rest/services/china3857";
var geo1 = {
type: "Polygon",
coordinates: [[[100.0, 30.0], [102.0, 30.0], [102.0, 32.0], [100.0, 32.0], [100.0, 30.0]]]
};
var geo2 = {
type: "Polygon",
coordinates: [[[101.0, 31.0], [103.0, 31.0], [103.0, 33.0], [101.0, 33.0], [101.0, 31.0]]]
};
options.srcData = JSON.stringify(geo1);
options.destData = JSON.stringify(geo2);
options.geoSRS = 'EPSG:4326';
options.outSRS = 'EPSG:4326';
var query = new L.kqmap.services.GeometryOverlap(options);
query.queryAsync(onsuccess, onfailed);
query.queryAsync(options, onsuccess, onfailed);
Extends
Methods
-
inherited queryAsync(onsuccess(), onfailed())
leaflet/services/QueryBase.js, line 48 -
查询请求,由子类实例化后调用。
Name Type Description onsuccess()
function 查询成功后处理函数。
onfailed()
function 查询错误后处理函数。