Skip to content

Commit de28714

Browse files
committed
add config to add coordinates to fulltext search
1 parent dbd278f commit de28714

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

l10n/custom-data-type-gnd.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ server.config.parameter.system.fulltext_gnd.succeedingCorporateBody.label,Nachfo
147147
server.config.parameter.system.fulltext_gnd.succeedingCorporateBody.checkbox,In Volltextsuche aufnehmen,Include in fulltext search
148148
server.config.parameter.system.fulltext_gnd.succeedingPlaceOrGeographicName.label,Nachfolgendes Geografikum,Succeeding Place Or Geographic Name
149149
server.config.parameter.system.fulltext_gnd.succeedingPlaceOrGeographicName.checkbox,In Volltextsuche aufnehmen,Include in fulltext search
150+
server.config.parameter.system.fulltext_gnd.location.label,Koordinaten,Coordinates
151+
server.config.parameter.system.fulltext_gnd.location.checkbox,In Volltextsuche aufnehmen,Include in fulltext search
150152
server.config.name.system.mapbox_gnd,Mapbox-Einstellungen,Mapbox-Config
151153
server.config.parameter.system.mapbox_gnd.mapbox_api_key.label,Mapbox-Api-Key (für Kartenanzeige benötigt),Mapbox Api-Key (required for map display)
152154
custom.data.type.gnd.config.parameter.mask.editor_display.value.label,Editor-Ansicht,Editor-Display

manifest.master.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,4 +272,8 @@ base_config:
272272
type: bool
273273
default: true
274274
position: 36
275+
location:
276+
type: bool
277+
default: true
278+
position: 37
275279

src/webfrontend/GNDUtil.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@ class GNDUtil
259259
for entry in efJSON.succeedingPlaceOrGeographicName
260260
if entry.label
261261
_fulltext += entry.label + ' '
262+
263+
if efJSON?.hasGeometry and fulltextConfig?.location
264+
efJsonGeoJson = @.getGEOJSONFromObject(efJSON)
265+
if efJsonGeoJson
266+
_fulltext += geoJSON.geometry.coordinates.join(" ")
262267

263268

264269
return _fulltext

0 commit comments

Comments
 (0)