diff --git a/src/app/map/components/map.component.html b/src/app/map/components/map.component.html index 867ac390c481eef10596ebeebb88ebe84c42325d..59ea33075ea375c8c645e453af8aed1c59c9b5e3 100644 --- a/src/app/map/components/map.component.html +++ b/src/app/map/components/map.component.html @@ -1,4 +1,5 @@ <div + *ngIf="window" id="map" class="body-wrap" leaflet diff --git a/src/app/map/components/map.component.ts b/src/app/map/components/map.component.ts index 4081dd2f6e27980b444b59bbd548d087f0a319f7..f9043374f4da369f9cc0272d12d5907de2060d19 100644 --- a/src/app/map/components/map.component.ts +++ b/src/app/map/components/map.component.ts @@ -29,6 +29,7 @@ export class MapComponent implements OnChanges { private readonly maxMobileViewWidth = 980; private currentStructure: Structure; + public window; public map: Map; public mapOptions: MapOptions; public zoomOptions = { animate: true, duration: 0.5 }; @@ -49,6 +50,7 @@ export class MapComponent implements OnChanges { private mapService: MapService, private geoJsonService: GeojsonService, ) { + this.window = null; // window; this.initializeMapOptions(); } @@ -323,7 +325,8 @@ export class MapComponent implements OnChanges { } private get isMobileView(): boolean { - return window.innerWidth <= this.maxMobileViewWidth; + return false; + // return window.innerWidth <= this.maxMobileViewWidth; } private centerLeafletMapOnMarker(markerId: string): void {