Skip to content

Commit ff4fa90

Browse files
new library = template support
1 parent 203908e commit ff4fa90

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/webfrontend/DANTEUtil.coffee

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ class DANTEUtil
7878
# lock facetTerm in savedata
7979
cdata.facetTerm = DANTEUtil.getFacetTermFromJSKOSObject resultJSKOS, that.getDatabaseLanguages(), labelWithHierarchie
8080
# lock conceptAncestors
81-
cdata.conceptAncestors = DANTEUtil.getConceptAncestorsFromJSKOS(resultJSKOS)
81+
cdata.conceptAncestors = DANTEUtil.getConceptAncestorsFromJSKOS resultJSKOS
82+
# lock geojson
83+
cdata.conceptGeoJSON = DANTEUtil.getGeoJSONFromDANTEJSKOS resultJSKOS
8284

8385
# is user allowed to choose label manually from list and not in expert-search?!
8486
if that.getCustomMaskSettings().allow_label_choice?.value && opts?.mode == 'editor'
@@ -385,6 +387,11 @@ class DANTEUtil
385387
# if l10n-object is not empty
386388
_standard.l10ntext = l10nObject
387389

390+
# add geo
391+
geoJSON = @getGeoJSONFromDANTEJSKOS JSKOS
392+
if geoJSON
393+
_standard.geo = geoJSON
394+
388395
return _standard
389396

390397

@@ -447,3 +454,12 @@ class DANTEUtil
447454
_facet_term = l10nObject
448455

449456
return _facet_term
457+
458+
@getGeoJSONFromDANTEJSKOS: (jskos) ->
459+
geoJSON = false
460+
461+
if jskos?.location
462+
if jskos.location != {} && jskos.location != []
463+
geoJSON = jskos.location
464+
465+
return geoJSON

0 commit comments

Comments
 (0)