diff --git a/apps/datahub/src/app/record/record-metadata/record-metadata.component.html b/apps/datahub/src/app/record/record-metadata/record-metadata.component.html index 8f5225f4e..15bd95ba5 100644 --- a/apps/datahub/src/app/record/record-metadata/record-metadata.component.html +++ b/apps/datahub/src/app/record/record-metadata/record-metadata.component.html @@ -81,7 +81,14 @@ style="height: 500px" *ngIf="displayMap$ | async" > - + + @@ -106,7 +113,10 @@
{ + return mapApiLinks?.find((link) => + link?.url.toString().startsWith('https://map.geo.admin.ch/') + ) + }), + filter((geoAdminUrl) => !!geoAdminUrl), + map((link) => + this.sanitizer.bypassSecurityTrustResourceUrl( + link.url.toString().replace('?layers=', '#/embed?layers=') + ) + ), + startWith(null) + ) + displayData$ = combineLatest([ this.metadataViewFacade.dataLinks$, this.metadataViewFacade.geoDataLinks$, @@ -149,6 +163,7 @@ export class RecordMetadataComponent { public metadataViewFacade: MdViewFacade, private searchService: SearchService, private sourceService: SourcesService, + private sanitizer: DomSanitizer, private orgsService: OrganizationsServiceInterface ) {}