diff --git a/packages/geo/src/lib/search/shared/sources/icherche.interfaces.ts b/packages/geo/src/lib/search/shared/sources/icherche.interfaces.ts
index 279170f4f7..f53d2f67e2 100644
--- a/packages/geo/src/lib/search/shared/sources/icherche.interfaces.ts
+++ b/packages/geo/src/lib/search/shared/sources/icherche.interfaces.ts
@@ -5,12 +5,11 @@ export interface IChercheData {
geometry: FeatureGeometry;
bbox: [number, number, number, number];
properties: { [key: string]: any };
+ icon?: string
highlight: {
title: string;
title2?: string;
title3?: string;
- title4?: string;
- title5?: string;
};
}
diff --git a/packages/geo/src/lib/search/shared/sources/icherche.ts b/packages/geo/src/lib/search/shared/sources/icherche.ts
index c2995a85e6..2deef23bbd 100644
--- a/packages/geo/src/lib/search/shared/sources/icherche.ts
+++ b/packages/geo/src/lib/search/shared/sources/icherche.ts
@@ -262,6 +262,7 @@ export class IChercheSearchSource extends SearchSource implements TextSearch {
q: this.computeTerm(term),
geometry: true,
bbox: true,
+ icon: true,
type:
'adresses,codes-postaux,municipalites,mrc,regadmin,lieux,entreprises,bornes'
},
@@ -283,7 +284,10 @@ export class IChercheSearchSource extends SearchSource implements TextSearch {
const titleHtml = data.highlight.title || data.properties.nom;
const subtitleHtml = data.highlight.title2
- ? ' ' + data.highlight.title2 + ''
+ ? ' ' + data.highlight.title2 + ''
+ : '';
+ const subtitleHtml2 = data.highlight.title3
+ ? '
' + data.highlight.title3 + ''
: '';
return {
@@ -303,8 +307,8 @@ export class IChercheSearchSource extends SearchSource implements TextSearch {
dataType: FEATURE,
id,
title: data.properties.nom,
- titleHtml: titleHtml + subtitleHtml,
- icon: 'map-marker'
+ titleHtml: titleHtml + subtitleHtml + subtitleHtml2,
+ icon: data.icon || 'map-marker'
}
};
}