BufferAnalysis
Buffer analysis of the specific graphics from the server.
Example:
var buffer_analysis = KQ.Query.BufferAnalysis.getInstance();
console.log(buffer_analysis);
try {
var options = {
url: 'http://172.16.0.106:8699/KQGis/rest/services',
data: '{"type":"Polygon","coordinates":[[[104.94105475249448,29.97276304931208],[104.94105475249448,30.028839993667194],[105.00551176529433,30.028839993667194],[105.00551176529433,29.97276304931208],[104.94105475249448,29.97276304931208]]]}',
geoSRS: 'EPSG:4326',
outSRS: 'EPSG:4326',
sideType: 'outer',
radius: 10000.0,
};
buffer_analysis.queryAsync(options,
function query_good () {
console.log('query_good');
var data = buffer_analysis.data();
console.log('buffer analysis data.length:' + data.length);
data.forEach(function (d) {
console.log(d);
})
},
function query_error () {
console.log('query_error');
});
}
catch (e) {
console.log('catch error:' + e);
}
Static Method Summary
Static Public Methods | ||
public static |
Get instance object (Singleton mode) |
Method Summary
Public Methods | ||
public |
Get data |
|
public |
Get last error message |
|
public |
Whether server return error |
|
public |
queryAsync(options: Object, function_good: function(): null, function_error: function(): null): Promise<TResult> Buffer analysis of the specific graphics from the server. |
Static Public Methods
Public Methods
public queryAsync(options: Object, function_good: function(): null, function_error: function(): null): Promise<TResult> source
Buffer analysis of the specific graphics from the server.
Params:
Name | Type | Attribute | Description |
options | Object | Buffer analysis options |
|
options.data | String | The graphics object for transform, the type is GeometryCollection or Polygon GeoJson object |
|
options.geoSRS | String | Spatial reference of the graphics coordinate |
|
options.outSRS | String | Target Spatial reference |
|
options.sideType | String | Buffer direction (outer:outer buffer, inner:inner buffer, left:left buffer, right:right buffer, both:both buffer) |
|
options.radius | String | Buffer radius, unit:meter, value range(0,1000000) |
|
function_good | function(): null | The function will run after querying successfully. |
|
function_error | function(): null | The function will run after querying unsuccessfully. |