Reference Source
public class | source

FeatureDelete

Delete a given feature from the specific layer.

See:

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

data(): Object[]

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 static getInstance(): FeatureDelete source

Get instance object (Singleton mode)

Return:

FeatureDelete

Public Methods

public data(): Object[] source

Get data

Return:

Object[]

public errorMsg(): String source

Get last error message

Return:

String

public isLastError(): Boolean source

Whether server return error

Return:

Boolean

public queryAsync(options: Object, function_good: function(): null, function_error: function(): null): Promise<TResult> source

Delete a given feature from the specific layer.

Params:

NameTypeAttributeDescription
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.

Return:

Promise<TResult>