From ad174dd7d774c3c45198af8ecd095bc8705241a0 Mon Sep 17 00:00:00 2001 From: Rainer Killinger Date: Fri, 28 Jun 2024 08:59:08 +0200 Subject: [PATCH] refactor: use static map files from backend --- frontend/app/src/app/modules/map/map-style.directive.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/app/src/app/modules/map/map-style.directive.ts b/frontend/app/src/app/modules/map/map-style.directive.ts index ffddd478..9412e73b 100644 --- a/frontend/app/src/app/modules/map/map-style.directive.ts +++ b/frontend/app/src/app/modules/map/map-style.directive.ts @@ -1,5 +1,6 @@ import {Directive, Input, Host} from '@angular/core'; import {MapComponent} from '@maplibre/ngx-maplibre-gl'; +import {environment} from '../../../environments/environment'; @Directive({ selector: 'mgl-map[styleName]', @@ -10,7 +11,7 @@ export class MapStyleDirective { @Input() set styleName(name: string) { - const style = `https://maps.server.uni-frankfurt.de/static/styles/${name}/style.json`; + const style = `${environment.backend_url}/_static/map/styles/${name}/style.json`; if (this.map.style) { this.map.mapInstance.setStyle(style); } else {