diff --git a/src/app/map/gisaf-mapbox/gisaf-mapbox.component.html b/src/app/map/gisaf-mapbox/gisaf-mapbox.component.html
index aa9ac3d..1ce9b2d 100644
--- a/src/app/map/gisaf-mapbox/gisaf-mapbox.component.html
+++ b/src/app/map/gisaf-mapbox/gisaf-mapbox.component.html
@@ -94,4 +94,4 @@
-
\ No newline at end of file
+
diff --git a/src/app/map/gisaf-mapbox/gisaf-mapbox.component.ts b/src/app/map/gisaf-mapbox/gisaf-mapbox.component.ts
index 2413141..0ede25d 100644
--- a/src/app/map/gisaf-mapbox/gisaf-mapbox.component.ts
+++ b/src/app/map/gisaf-mapbox/gisaf-mapbox.component.ts
@@ -1,5 +1,7 @@
-import { Component, OnInit, OnDestroy, Input, ViewChild, NgZone,
- ChangeDetectionStrategy, ChangeDetectorRef, ElementRef } from '@angular/core'
+import {
+ Component, OnInit, OnDestroy, Input, ViewChild, NgZone,
+ ChangeDetectionStrategy, ChangeDetectorRef, ElementRef
+} from '@angular/core'
import { ActivatedRoute, Params, Router } from '@angular/router'
import { Observable } from 'rxjs'
@@ -8,9 +10,11 @@ import { WebSocketSubject } from 'rxjs/webSocket'
import { MatSnackBar } from '@angular/material/snack-bar'
-import { Map, MapMouseEvent, LayerSpecification,
- GeoJSONSourceSpecification, FitBoundsOptions,
- ExpressionSpecification, Source, GeoJSONSource } from 'maplibre-gl'
+import {
+ Map, MapMouseEvent, LayerSpecification,
+ GeoJSONSourceSpecification, FitBoundsOptions,
+ ExpressionSpecification, Source, GeoJSONSource
+} from 'maplibre-gl'
import Point from '@mapbox/point-geometry'
import * as bbox from '@turf/bbox'
@@ -23,1255 +27,1255 @@ import { InfoDataService, Feature, TaggedLayer, FeatureWithField, TaggedFeature
import { MapDataService, BaseStyle } from '../map-data.service'
export class LayerWithMetaData {
- constructor(
- public layer: LayerSpecification,
- public highlightedLayer: LayerSpecification,
- public layerNode: LayerNode,
- ) {}
+ constructor(
+ public layer: LayerSpecification,
+ public highlightedLayer: LayerSpecification,
+ public layerNode: LayerNode,
+ ) { }
}
let normalize = (s: string) => s ? s.trim().toLowerCase() : ''
@Component({
- selector: 'gisaf-mapbox',
- templateUrl: 'gisaf-mapbox.component.html',
- styleUrls: [ 'gisaf-mapbox.component.css' ],
- changeDetection: ChangeDetectionStrategy.OnPush,
- providers: [
- GeoJsonService,
- LiveGeoJsonService,
- ],
+ selector: 'gisaf-mapbox',
+ templateUrl: 'gisaf-mapbox.component.html',
+ styleUrls: ['gisaf-mapbox.component.css'],
+ changeDetection: ChangeDetectionStrategy.OnPush,
+ providers: [
+ GeoJsonService,
+ LiveGeoJsonService,
+ ],
})
export class GisafMapboxComponent implements OnInit, OnDestroy {
- @ViewChild('mglMap', { static: true }) mglMap: Map
- @ViewChild('featureInfo', { static: true }) featureInfo: ElementRef
- @ViewChild('mouseLngLat', { static: true }) mouseLngLat: ElementRef
- @ViewChild('customAttribution', { static: true }) customAttributionElement: ElementRef
+ @ViewChild('mglMap', { static: true }) mglMap: Map
+ @ViewChild('featureInfo', { static: true }) featureInfo: ElementRef
+ @ViewChild('mouseLngLat', { static: true }) mouseLngLat: ElementRef
+ @ViewChild('customAttribution', { static: true }) customAttributionElement: ElementRef
- // XXX: temporary, for keeping map-controls.component.ts happy
- map: Map
+ // XXX: temporary, for keeping map-controls.component.ts happy
+ map: Map
- zoom: number = this.configService.conf.value.bsData?.map['zoom']
- pitch: number = this.configService.conf.value.bsData?.map['pitch']
- lat: number = this.configService.conf.value.bsData?.map['lat']
- lng: number = this.configService.conf.value.bsData?.map['lng']
- bearing: number = this.configService.conf.value.bsData?.map['bearing']
- globalAttribution: string = this.configService.conf.value.bsData?.map['attribution']
+ zoom: number = this.configService.conf.value.bsData?.map['zoom']
+ pitch: number = this.configService.conf.value.bsData?.map['pitch']
+ lat: number = this.configService.conf.value.bsData?.map['lat']
+ lng: number = this.configService.conf.value.bsData?.map['lng']
+ bearing: number = this.configService.conf.value.bsData?.map['bearing']
+ globalAttribution: string = this.configService.conf.value.bsData?.map['attribution']
- baseStyle: BaseStyle = new BaseStyle('None')
- protected _baseStyleName: string = this.configService.conf.value.bsData?.map['style']
- protected _bottom: number = 0
+ baseStyle: BaseStyle = new BaseStyle('None')
+ protected _baseStyleName: string = this.configService.conf.value.bsData?.map['style']
+ protected _bottom: number = 0
- protected canvas: HTMLElement
+ protected canvas: HTMLElement
- protected selStart: Point
- protected selAppend: boolean
- protected selBox: HTMLDivElement
+ protected selStart: Point
+ protected selAppend: boolean
+ protected selBox: HTMLDivElement
- geolocateTrackUserLocation = true
- geolocateShowUserLocation = true
- geolocatePositionOptions = {
- "enableHighAccuracy": true
- }
- geolocateFitBoundsOptions: FitBoundsOptions = {
- "maxZoom": 12,
- }
+ geolocateTrackUserLocation = true
+ geolocateShowUserLocation = true
+ geolocatePositionOptions = {
+ "enableHighAccuracy": true
+ }
+ geolocateFitBoundsOptions: FitBoundsOptions = {
+ "maxZoom": 12,
+ }
- popupOnFeature: string | null | number
+ popupOnFeature: string | null | number
- layerDefs: object = {}
- layers: object = {}
- highlightedLayers: object = {}
- originalBaseStyle: BaseStyle
- pendingLayers: LayerWithMetaData[] = []
- subscribedLiveLayers: LayerNode[] = []
+ layerDefs: object = {}
+ layers: object = {}
+ highlightedLayers: object = {}
+ originalBaseStyle: BaseStyle
+ pendingLayers: LayerWithMetaData[] = []
+ subscribedLiveLayers: LayerNode[] = []
- protected _baseStyleOpacity: number
- private _pendingBaseStyleOpacity: number
- protected wss: object = {} // WebSocketSubject