mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
Remove unneeded platform checks
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
<div class="container">
|
||||
<h1>{{ 'browse.metadata.map' | translate }}</h1>
|
||||
@if (isPlatformBrowser(platformId)) {
|
||||
@defer {
|
||||
<ds-geospatial-map [facetValues]="facetValues$"
|
||||
[currentScope]="this.scope$|async"
|
||||
[layout]="'browse'"
|
||||
style="width: 100%;">
|
||||
</ds-geospatial-map>
|
||||
}
|
||||
@defer {
|
||||
<ds-geospatial-map [facetValues]="facetValues$"
|
||||
[currentScope]="this.scope$|async"
|
||||
[layout]="'browse'"
|
||||
style="width: 100%;">
|
||||
</ds-geospatial-map>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
@@ -6,9 +6,7 @@ import {
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
Inject,
|
||||
OnInit,
|
||||
PLATFORM_ID,
|
||||
} from '@angular/core';
|
||||
import {
|
||||
ActivatedRoute,
|
||||
@@ -67,7 +65,6 @@ export class BrowseByGeospatialDataComponent implements OnInit {
|
||||
public facetValues$: Observable<FacetValues> = of(null);
|
||||
|
||||
constructor(
|
||||
@Inject(PLATFORM_ID) public platformId: string,
|
||||
private searchConfigurationService: SearchConfigurationService,
|
||||
private searchService: SearchService,
|
||||
protected route: ActivatedRoute,
|
||||
|
@@ -37,6 +37,8 @@ import { GeospatialMapDetail } from './models/geospatial-map-detail.model';
|
||||
* Component to draw points and polygons on a tiled map using leaflet.js
|
||||
* This component can be used by item page fields, the browse-by geospatial component, and the geospatial search
|
||||
* view mode to render related places of an item (e.g. metadata on a page), or items *as* places (e.g. browse / search)
|
||||
*
|
||||
* This component should be used in a `@defer` block to keep geospatial mapping libraries out of the main bundle!
|
||||
*/
|
||||
export class GeospatialMapComponent implements AfterViewInit, OnInit, OnDestroy {
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
@if (isPlatformBrowser(platformId)) {
|
||||
<ds-geospatial-map [mapInfo]="mapInfo"></ds-geospatial-map>
|
||||
}
|
||||
<!--
|
||||
Note: ds-object-geospatial-map itself should be rendered in a @defer block, so we don't need one here.
|
||||
https://angular.dev/guide/templates/defer#avoid-cascading-loads-with-nested-defer-blocks
|
||||
-->
|
||||
<ds-geospatial-map [mapInfo]="mapInfo"></ds-geospatial-map>
|
||||
|
@@ -41,7 +41,9 @@ import { parseGeoJsonFromMetadataValue } from '../utils/geospatial.functions';
|
||||
|
||||
/**
|
||||
* This component is used with the GeospatialMap ViewMode in search or browse results, and
|
||||
* prepares geospatial data collection for display on the GeospatialMapComponent
|
||||
* prepares geospatial data collection for display on the GeospatialMapComponent.
|
||||
*
|
||||
* This component should be used in a `@defer` block to keep geospatial mapping libraries out of the main bundle!
|
||||
*/
|
||||
export class ObjectGeospatialMapComponent {
|
||||
|
||||
|
Reference in New Issue
Block a user