Q: How do you set the return results to sort in a certain way in SuperMap iClient for Javascript query?

A: The orderBy parameter in SuperMap.REST.FilterParameter class is equivalent to the ORDER BY in SQL statements. The format is: ORDER BY < column name >. The column name is the name of each column in the property table, and column can also be called the attribute. In SuperMap, it is also called field. When sorting a single field, the field usage is orderBy = "field name"; when sorting multiple fields, the fields are separated by an English comma, which is used as orderBy = "field name 1, field name 2". For example, there is a country dataset, and it has two fields: “SmArea”and “pop_1994”, which represents the country size and the number of countries in 1994. If you want to sort the records according to the number of countries, orderBy = "pop 1994"; if you want to sort by area and population, orderBy = "SmArea, pop 1994".

09 July,2019
Tags: iClient

More iClient FAQ