OptionalfilterThe OGC expression that the server must apply to the requested feature types.
OptionalmaxThe maximum number of features the server should return in response to this query.
OptionalpropertyThe properties of the feature to include in the response. When left undefined, all properties of the feature are returned.
OptionalsortSets the OGC SortBy conditions that the WFS should apply to the requested features.
Results returned by a WFS service can be ordered in a specific way. This is useful when features have properties representing quantities, such as a city's population, especially in combination with WFSQueryOptions.maxFeatures.
The following example demonstrates how to configure a QueryProvider to retrieve a limited number of features
sorted by the population property. The sortBy property ensures that the most densely populated cities are returned.
Without a sort order, the query would retrieve 100 arbitrary cities.
class MaxFeaturesQueryProvider extends QueryProvider {
getQueryForLevel(level: number): WFSQueryOptions {
return {
maxFeatures: 100,
sortBy: [{
sortProperty: "TOT_POP",
sortOrder: SortOrder.Descending
}]
};
}
getQueryLevelScales(layer: FeatureLayer, map: RIAMap): number[] {
return [];
}
}
You can provide multiple SortBy conditions.
The following example sorts features by the "Country" property and then by the "Name" property.
Features are first ordered by "Country". If multiple features have the same "Country",
they are then ordered by "Name".
sortBy: [
{sortProperty: "Country", sortOrder: SortOrder.Ascending},
{sortProperty: "Name", sortOrder: SortOrder.Descending},
]
An object literal which contains the query-parameters. It is used to pass