mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2025-12-11 08:46:16 +00:00
refactor: use static map files from backend
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user