AW-6046 Fix open layers 8 issues
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
2024-04-09 15:50:03 +02:00
parent 023048a5bb
commit 97d6d569a0
4 changed files with 8 additions and 6 deletions

View File

@@ -133,7 +133,7 @@ export class MapEffects {
f.id = f.properties["code"];
}
}
return of(new mapActions.StartSearchSuccess(this._geojsonFormat.readFeatures(features), a.queryState));
return of(new mapActions.StartSearchSuccess(this._geojsonFormat.readFeatures(features).filter(feature => feature instanceof Feature) as Feature[], a.queryState));
}
),
catchError(error => of(new commonActions.Fail(error))));
@@ -218,7 +218,7 @@ export class MapEffects {
if (!this.overrideSelectedItemLayer) {
return this.itemService$.getFeature(action.item.code, "EPSG:3857").pipe(
map((feature: any) => {
const f = this._geojsonFormat.readFeature(feature);
const f = this._geojsonFormat.readFeature(feature) as Feature;
f.setId(action.item.code);
return new mapActions.AddFeatureSuccess(f);
}),