Skip to content

Commit

Permalink
Merge pull request #992 from dbauszus-glx/gazetteer-no-result
Browse files Browse the repository at this point in the history
no_result configuration for gazetteer.
  • Loading branch information
RobAndrewHurst authored Nov 8, 2023
2 parents fe2908a + 33a796c commit cf5ded3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/utils/gazetteer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function datasets(term, gazetteer) {
label: gazetteer.label,
title: gazetteer.title,
limit: gazetteer.limit,
no_result: gazetteer.no_result,
leading_wildcard: gazetteer.leading_wildcard,
callback: gazetteer.callback,
maxZoom: gazetteer.maxZoom,
Expand Down Expand Up @@ -69,10 +70,11 @@ export function datasets(term, gazetteer) {

// No results
if (!e.target.response) {
if (dataset.no_result === null) return;
gazetteer.list.append(mapp.utils.html.node`
<li>
<span class="label">${dataset.title || layer.name}</span>
<span>${mapp.dictionary.no_results}</span>`)
<span>${dataset.no_result || mapp.dictionary.no_results}</span>`)
return;
}

Expand Down

0 comments on commit cf5ded3

Please sign in to comment.