diff --git a/apps/datahub/src/app/app.module.ts b/apps/datahub/src/app/app.module.ts index aa26d09f4..0b9aa8249 100644 --- a/apps/datahub/src/app/app.module.ts +++ b/apps/datahub/src/app/app.module.ts @@ -43,7 +43,6 @@ import { UiLayoutModule, } from '@geonetwork-ui/ui/layout' import { UiSearchModule } from '@geonetwork-ui/ui/search' -import { IgnApiDlComponent } from '@geonetwork-ui/feature/record' import { getGlobalConfig, diff --git a/libs/ui/elements/src/lib/download-item/download-item.component.html b/libs/ui/elements/src/lib/download-item/download-item.component.html index 7d3d242bf..28cb3dea9 100644 --- a/libs/ui/elements/src/lib/download-item/download-item.component.html +++ b/libs/ui/elements/src/lib/download-item/download-item.component.html @@ -62,7 +62,11 @@
-
+
diff --git a/libs/ui/elements/src/lib/download-item/download-item.component.ts b/libs/ui/elements/src/lib/download-item/download-item.component.ts index cdd991503..2f876649b 100644 --- a/libs/ui/elements/src/lib/download-item/download-item.component.ts +++ b/libs/ui/elements/src/lib/download-item/download-item.component.ts @@ -7,10 +7,8 @@ import { Output, } from '@angular/core' import { DatasetOnlineResource } from '@geonetwork-ui/common/domain/model/record' -import Map from 'ol/Map' -import View from 'ol/View' -import TileLayer from 'ol/layer/Tile' -import OSM from 'ol/source/OSM' +import { MapContext } from '@geospatial-sdk/core' +import { Observable } from 'rxjs' @Component({ selector: 'gn-ui-download-item', @@ -19,13 +17,16 @@ import OSM from 'ol/source/OSM' changeDetection: ChangeDetectionStrategy.OnPush, }) export class DownloadItemComponent implements OnInit { + onMapFeatureSelect($event: Event) { + throw new Error('Method not implemented.') + } @Input() link: DatasetOnlineResource @Input() color: string @Input() format: string @Input() isFromWfs: boolean @Output() exportUrl = new EventEmitter() - map: Map isModalGPF: boolean + mapContext$: Observable openUrl() { this.exportUrl.emit(this.link.url.toString()) @@ -33,14 +34,6 @@ export class DownloadItemComponent implements OnInit { ngOnInit(): void { this.isModalGPF = false - this.map = new Map({ - layers: [new TileLayer({ source: new OSM() })], - view: new View({ - center: [0, 0], - zoom: 1, - }), - target: 'maptest', - }) } openModalLayer() { diff --git a/libs/ui/elements/src/lib/ui-elements.module.ts b/libs/ui/elements/src/lib/ui-elements.module.ts index 1ebe63d3c..d76c66328 100644 --- a/libs/ui/elements/src/lib/ui-elements.module.ts +++ b/libs/ui/elements/src/lib/ui-elements.module.ts @@ -35,6 +35,7 @@ import { MarkdownParserComponent } from './markdown-parser/markdown-parser.compo import { ImageOverlayPreviewComponent } from './image-overlay-preview/image-overlay-preview.component' import { UserFeedbackItemComponent } from './user-feedback-item/user-feedback-item.component' import { TimeSincePipe } from './user-feedback-item/time-since.pipe' +import { MapContainerComponent } from '@geonetwork-ui/ui/map' @NgModule({ imports: [ @@ -56,6 +57,7 @@ import { TimeSincePipe } from './user-feedback-item/time-since.pipe' BadgeComponent, MaxLinesComponent, TextInputComponent, + MapContainerComponent, ], declarations: [ MetadataInfoComponent,