@@ -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
) {}