diff --git a/src/app/_services/geojson.service.ts b/src/app/_services/geojson.service.ts index 6b5929a..74797cd 100644 --- a/src/app/_services/geojson.service.ts +++ b/src/app/_services/geojson.service.ts @@ -9,64 +9,64 @@ import { MapService, MaplibreStyle } from '../openapi' export class MapboxDataAndStyle { - constructor( - public data: object, - public style: MaplibreStyle, - ) {} + constructor( + public data: object, + public style: MaplibreStyle, + ) { } } @Injectable() export class GeoJsonService { - constructor( - private _http: HttpClient, - // private apollo: Apollo, - public mapService: MapService, - ) {} + constructor( + private _http: HttpClient, + // private apollo: Apollo, + public mapService: MapService, + ) { } - getLayer(url: string, params?: object): Observable { - if (!params) { - params = {} - } - return this._http.get(url, { - headers: params, - }) + getLayer(url: string, params?: object): Observable { + if (!params) { + params = {} } + return this._http.get(url, { + headers: params, + }) + } - getStyle(store: string): Observable { - return this.mapService.getLayerStyleApiMapLayerStyleStoreGet({store: store}) - } + getStyle(store: string): Observable { + return this.mapService.getLayerStyleApiMapLayerStyleStoreGet({ store: store }) + } - getAll(url: string, store: string, params?: object): Observable { - return forkJoin([ - this.getLayer(url, params), - this.getStyle(store), - ]).pipe(map( - res => new MapboxDataAndStyle(res[0], res[1]) - )) - } + getAll(url: string, store: string, params?: object): Observable { + return forkJoin([ + this.getLayer(url, params), + this.getStyle(store), + ]).pipe(map( + res => new MapboxDataAndStyle(res[0], res[1]) + )) + } } @Injectable() export class LiveGeoJsonService { - messages = {} - ws: any - constructor( - private wsService: WebsocketService - ) {} + messages = {} + ws: any + constructor( + private wsService: WebsocketService + ) { } - connect(channel: string) { - const hostname = window.location.hostname - const port = window.location.port - let protocol = window.location.protocol == 'https:' ? 'wss:' : 'ws:' - this.wsService.connect( - protocol + '//' + hostname + ':' + port + '/gj/live/' + channel - ) - return this.wsService.ws - } + connect(channel: string) { + const hostname = window.location.hostname + const port = window.location.port + let protocol = window.location.protocol == 'https:' ? 'wss:' : 'ws:' + this.wsService.connect( + protocol + '//' + hostname + ':' + port + '/gj/live/' + channel + ) + return this.wsService.ws + } - disconnect() { - this.wsService.disconnect() - } -} \ No newline at end of file + disconnect() { + this.wsService.disconnect() + } +} diff --git a/src/app/openapi/core/OpenAPI.ts b/src/app/openapi/core/OpenAPI.ts index f5d91d6..fe30114 100644 --- a/src/app/openapi/core/OpenAPI.ts +++ b/src/app/openapi/core/OpenAPI.ts @@ -47,7 +47,7 @@ export const OpenAPI: OpenAPIConfig = { PASSWORD: undefined, TOKEN: undefined, USERNAME: undefined, - VERSION: '0.1.dev70+g53c2e35.d20240422', + VERSION: '0.1.dev85+g41e92fa.d20240509', WITH_CREDENTIALS: false, interceptors: {response: new Interceptors(), }, diff --git a/src/app/openapi/schemas.gen.ts b/src/app/openapi/schemas.gen.ts index e7a6aa4..4482a28 100644 --- a/src/app/openapi/schemas.gen.ts +++ b/src/app/openapi/schemas.gen.ts @@ -515,7 +515,7 @@ export const $BootstrapData = { version: { type: 'string', title: 'Version', - default: '0.1.dev70+g53c2e35.d20240422' + default: '0.1.dev85+g41e92fa.d20240509' }, title: { type: 'string', @@ -542,7 +542,7 @@ export const $BootstrapData = { opacity: 0.4, pitch: 0, status: ['E', 'F', 'D'], - style: 'osm', + style: 'No base map', tagKeys: ['source'], tileServer: { baseDir: '/home/phil/gisaf_misc/map', @@ -1713,6 +1713,9 @@ export const $MaplibreStyle = { }, { type: 'string' + }, + { + type: 'boolean' } ] }, @@ -1744,6 +1747,9 @@ export const $MaplibreStyle = { }, { type: 'string' + }, + { + type: 'boolean' } ] },