refactor: use static map files from backend

This commit is contained in:
Rainer Killinger
2024-06-28 08:59:08 +02:00
parent 26e654f5b8
commit ad174dd7d7

View File

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