Skip to content

Commit 5c80b9d

Browse files
committed
Added resultModifier to denkmalsucheDishIntern, results are now sorted
1 parent bb221b8 commit 5c80b9d

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

packages/clients/dish/src/mapConfigurations/searchConfigParams.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const searchMethods = {
9090
denkmalsucheDishIntern: {
9191
groupId: groupDenkmalsuche,
9292
categoryId: 'categoryDenkmalsucheDishIntern',
93-
type: 'wfs',
93+
type: 'dishIntern',
9494
// url is in mapConfig due to variable setting,
9595
queryParameters: {
9696
id: denkmaelerWFS,
@@ -114,11 +114,28 @@ export const searchMethods = {
114114
'{{objektansprache}}, {{gemeinde}}, ONR {{objektid}}',
115115
],
116116
},
117+
resultModifier: (featureCollection) => {
118+
if (
119+
featureCollection.features === undefined ||
120+
featureCollection.features === null
121+
) {
122+
return featureCollection
123+
}
124+
const featuresSorted = sortFeaturesByProperties(
125+
featureCollection.features,
126+
['gemeinde', 'objektansprache', 'strasse', 'hausnummer', 'objektid']
127+
)
128+
return {
129+
...featureCollection,
130+
features: featuresSorted,
131+
}
132+
},
117133
},
134+
118135
alkisSearch: {
119136
groupId: groupDenkmalsuche,
120137
categoryId: 'categoryIdAlkisSearch',
121-
type: 'alkis',
138+
type: 'dishIntern',
122139
// will be set later due to mode setting
123140
url: null,
124141
queryParameters: {

0 commit comments

Comments
 (0)