FeatureDelete
Delete a given feature from the specific layer.
Example:
var feature_delete = KQ.Query.FeatureDelete.getInstance();
console.log(feature_delete);
try {
var options = {
url: 'http://172.16.0.106:8699/KQGis/rest/services/zy',
layerId: 77,
where: 'objectid=21337',
};
feature_delete.queryAsync(options,
function query_good () {
console.log('query_good');
var data = feature_delete.data();
console.log('feature delete data.length:' + data.length);
data.forEach(function (d) {
console.log("Feature query count: " + d.querycount);
console.log("Feature delete count: " + d.deletecount);
})
},
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> Delete a given feature from the specific layer. |
Static Public Methods
Public Methods
public queryAsync(options: Object, function_good: function(): null, function_error: function(): null): Promise<TResult> source
Delete a given feature from the specific layer.
Params:
Name | Type | Attribute | Description |
options | Object | Feature delete options |
|
options.url | String | Service url |
|
options.layerId | String | layer ID |
|
options.where | String | delete condition, where statement |
|
function_good | function(): null | The function will run after querying successfully. |
|
function_error | function(): null | The function will run after querying unsuccessfully. |