Class: FilterParameter

SuperMap.FilterParameter

The FilterParameter class. This class is used to set query filter parameters of query datasets.

new SuperMap.FilterParameter(options)

FilterParameter.js, line 6
Name Type Description
options Object

The parameters.

Name Type Description
attributeFilter string

Attribute filter.

name string

The query dataset name or the layer name.

joinItems Array.<SuperMap.JoinItem> optional

The JoinItem array that contains the information about the connection with an external table.

linkItems Array.<SuperMap.LinkItem> optional

The linking information LinkItem array for the external table.

ids Array.<string> optional

The query ID array, i.e., SmID values in the attribute table.

orderBy string optional

The fields of querying and sorting. And the orderBy field must be numeric type.

groupBy string optional

The grouped fields by querying.

fields Array.<string> optional

The array of query fields.

Members

attributeFilterstring

Attribute filter. Equivalent to the WHERE clause in the SQL statement. Its format is: WHERE , attributeFilter is one of the "conditional expression". The usage of this field is attributeFilter = "filter conditions". For example, to query records less than 100 in the fieldValue field, set attributeFilter = "fieldValue <100"; To query the records with the value of the field name as "hotel", sets attributeFilter = "name like '%hotel%'", and so on.

fieldsArray.<string>

The array of query fields. If not, all fields returned from the system are used.

groupBystring

he grouped fields by querying. Equivalent to the GROUP BY clause in the SQL statement, its format is: ORDER BY . The column name is the name of each column in the attribute table. The column is also called property, it is known as the field in SuperMap. When grouping on a single field, the usage of the field is groupBy="field name"; when grouping on multiple fields, they are separated by a comma, the usage is groupBy="filed 1, filed 2". For example, there is a dataset of global cities. It has two fields namely "Continent" and "Country". The two fields represent the continent and the country which the city belongs to, If grouping on world's cities according to countries, groupBy = "Country"; if grouping on cities by continents and countries, groupBy="Continent, Country".

idsArray.<string>

The query ID array, i.e., SmID values in the attribute table.

joinItemsArray.<SuperMap.JoinItem>

The JoinItem array that contains the information about the connection with an external table.

linkItemsArray.<SuperMap.LinkItem>

The linking information LinkItem array for the external table.

namestring

The query dataset name or the layer name,according to the actual query object, and it is a required property. Normally, this field is the dataset name, but when operating with the related functions of the map, it should be set to the layer name (the layer name format: the_dataset_name@the_datasource_alias). Layers in a map are probably from datasets of different datasources which may have the datasets with the same name, thus using the dataset name cannot uniquely identify the dataset. Therefore, the value should be set to the layer name when the related functions of the map are operating on.

orderBystring

The fields of querying and sorting. And the orderBy field must be numeric type. Equivalent to the ORDER BY clause in the SQL statement, its format is: ORDER BY . The column name is the name of each column in the attribute table. The column is also called property, it is known as the field in SuperMap. When sorting on a single field, the usage of the field is orderBy="field name"; when sorting on multiple fields, they are separated by a comma, the usage is orderBy="filed 1, filed 2". For example, there is a national dataset; with two fields namely "SmArea" and "pop_1994". The two fields represent the area of the country and the number of populations in 1994. If sorting on records in accordance with the national population, orderBy = "pop_1994"; If sorting on the area and the population, orderBy="SmArea, pop_1994".

Methods

destroy()

FilterParameter.js, line 106

Disposes the resource. The property that references resource is set to null.