diff --git a/packages/geo/src/lib/feature/shared/strategies/search.ts b/packages/geo/src/lib/feature/shared/strategies/search.ts
index 22625092ae..8b71251913 100644
--- a/packages/geo/src/lib/feature/shared/strategies/search.ts
+++ b/packages/geo/src/lib/feature/shared/strategies/search.ts
@@ -118,22 +118,24 @@ export class FeatureStoreSearchIndexStrategy extends EntityStoreStrategy {
return Object.assign({}, {field: sf2.name, tokenize: "full"}, sf2.searchIndex);
});
} else {
- // THIS METHOD COMPUTE COLUMN DISTINCT VALUE TO FILTER WHICH COLUMN TO INDEX BASED ON A RATIO or discard float columns
- const columns = Object.keys(featuresProperties[0]);
- const columnsToIndex = [];
- columnsToNotIndex = columns.map((column) => {
- const distinctValues = [...new Set(featuresProperties.map(item => item[column]))];
- // identify column to not index based on a ratio distinctValues/nb of features OR discart exclusive float column (ex: lat, long)
- if (
- (distinctValues.length / featuresProperties.length) * 100 <= ratio ||
- distinctValues.every(n => Number(n) === n && n % 1 !== 0)) {
- columnsToNotIndex.push(column);
- } else {
- columnsToIndex.push(column);
- }
- }).filter(f => f);
- const keysToIndex = columnsToIndex.filter(f => f!== 'igoSearchID');
- contentToIndex = keysToIndex.map(key => {return {field: key,tokenize: "full"};});
+ if (featuresProperties.length) {
+ // THIS METHOD COMPUTE COLUMN DISTINCT VALUE TO FILTER WHICH COLUMN TO INDEX BASED ON A RATIO or discard float columns
+ const columns = Object.keys(featuresProperties[0]);
+ const columnsToIndex = [];
+ columnsToNotIndex = columns.map((column) => {
+ const distinctValues = [...new Set(featuresProperties.map(item => item[column]))];
+ // identify column to not index based on a ratio distinctValues/nb of features OR discart exclusive float column (ex: lat, long)
+ if (
+ (distinctValues.length / featuresProperties.length) * 100 <= ratio ||
+ distinctValues.every(n => Number(n) === n && n % 1 !== 0)) {
+ columnsToNotIndex.push(column);
+ } else {
+ columnsToIndex.push(column);
+ }
+ }).filter(f => f);
+ const keysToIndex = columnsToIndex.filter(f => f !== 'igoSearchID');
+ contentToIndex = keysToIndex.map(key => { return { field: key, tokenize: "full" }; });
+ }
}
store.index.forEach((value, key) => {
const propertiesToIndex = JSON.parse(JSON.stringify(value.properties));
diff --git a/packages/geo/src/lib/search/search-results/save-feature-dialog.component.html b/packages/geo/src/lib/search/search-results/save-feature-dialog.component.html
index dade16b92c..52f50204af 100644
--- a/packages/geo/src/lib/search/search-results/save-feature-dialog.component.html
+++ b/packages/geo/src/lib/search/search-results/save-feature-dialog.component.html
@@ -19,7 +19,7 @@
{{'igo.geo.layer.saveFeatureInLayer'
[matAutocomplete]="auto"
formControlName="layerName">
-
+
{{layer.title}}
diff --git a/packages/geo/src/lib/search/search-results/save-feature-dialog.component.ts b/packages/geo/src/lib/search/search-results/save-feature-dialog.component.ts
index f46462ebf7..60bc965f79 100644
--- a/packages/geo/src/lib/search/search-results/save-feature-dialog.component.ts
+++ b/packages/geo/src/lib/search/search-results/save-feature-dialog.component.ts
@@ -17,7 +17,7 @@ export class SaveFeatureDialogComponent implements OnInit {
public form: UntypedFormGroup;
feature: SearchResult;
layers: Layer[] = [];
- filteredLayers: Observable;
+ filteredLayers$: Observable;
constructor(
private formBuilder: UntypedFormBuilder,
@@ -35,7 +35,7 @@ export class SaveFeatureDialogComponent implements OnInit {
ngOnInit() {
this.feature = this.data.feature;
this.layers = this.data.layers;
- this.filteredLayers = this.form.controls['layerName'].valueChanges.pipe(
+ this.filteredLayers$ = this.form.controls['layerName'].valueChanges.pipe(
startWith(''),
map(val => this.filter(val))
);
diff --git a/packages/geo/src/lib/search/search-results/search-results-add-button.component.ts b/packages/geo/src/lib/search/search-results/search-results-add-button.component.ts
index dcc7bdf128..b3f131e9a0 100644
--- a/packages/geo/src/lib/search/search-results/search-results-add-button.component.ts
+++ b/packages/geo/src/lib/search/search-results/search-results-add-button.component.ts
@@ -32,7 +32,6 @@ import OlOverlay from 'ol/Overlay';
import { VectorSourceEvent as OlVectorSourceEvent } from 'ol/source/Vector';
import { default as OlGeometry } from 'ol/geom/Geometry';
import { QueryableDataSourceOptions } from '../../query';
-import { createOverlayDefaultStyle } from '../../style/shared/overlay/overlay-style.utils';
@Component({
@@ -334,12 +333,18 @@ export class SearchResultAddButtonComponent implements OnInit, OnDestroy{
id: 'igo-search-layer' + ++layerCounterID,
title: layerTitle,
source: dataSource,
- style: createOverlayDefaultStyle({
- text: '',
- strokeWidth: 1,
- fillColor: 'rgba(255,255,255,0.4)',
- strokeColor: 'rgba(143,7,7,1)'
- }),
+ igoStyle: {
+ editable: false,
+ igoStyleObject: {
+ fill: { color: 'rgba(255,255,255,0.4)' },
+ stroke: { color: 'rgba(143,7,7,1)', width: 1 },
+ circle: {
+ fill: { color: 'rgba(255,255,255,0.4)', },
+ stroke: { color: 'rgba(143,7,7,1)', width: 1 },
+ radius: 5,
+ }
+ }
+ },
showInLayerList: true,
exportable: true,
workspace: {
diff --git a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.html b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.html
index 3b9e7837d7..1449b1cc8f 100644
--- a/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.html
+++ b/packages/integration/src/lib/search/search-results-tool/search-results-tool.component.html
@@ -32,7 +32,7 @@ {{ 'igo.integration.searchResultsTool.noResults' | translate }}
-
+