Formatting

This commit is contained in:
Pieter Vander Vennet 2023-05-18 23:44:15 +02:00
parent 5c01f6ada9
commit c9bef0443e

View file

@ -1,18 +1,18 @@
<script lang="ts"> <script lang="ts">
import type { SpecialVisualizationState } from "../SpecialVisualization"; import type {SpecialVisualizationState} from "../SpecialVisualization";
import LocationInput from "../InputElement/Helpers/LocationInput.svelte"; import LocationInput from "../InputElement/Helpers/LocationInput.svelte";
import { UIEventSource } from "../../Logic/UIEventSource"; import {UIEventSource} from "../../Logic/UIEventSource";
import { Tiles } from "../../Models/TileRange"; import {Tiles} from "../../Models/TileRange";
import { Map as MlMap } from "maplibre-gl"; import {Map as MlMap} from "maplibre-gl";
import { BBox } from "../../Logic/BBox"; import {BBox} from "../../Logic/BBox";
import type { MapProperties } from "../../Models/MapProperties"; import type {MapProperties} from "../../Models/MapProperties";
import ShowDataLayer from "../Map/ShowDataLayer"; import ShowDataLayer from "../Map/ShowDataLayer";
import type { FeatureSource, FeatureSourceForLayer } from "../../Logic/FeatureSource/FeatureSource"; import type {FeatureSource, FeatureSourceForLayer} from "../../Logic/FeatureSource/FeatureSource";
import SnappingFeatureSource from "../../Logic/FeatureSource/Sources/SnappingFeatureSource"; import SnappingFeatureSource from "../../Logic/FeatureSource/Sources/SnappingFeatureSource";
import FeatureSourceMerger from "../../Logic/FeatureSource/Sources/FeatureSourceMerger"; import FeatureSourceMerger from "../../Logic/FeatureSource/Sources/FeatureSourceMerger";
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"; import LayerConfig from "../../Models/ThemeConfig/LayerConfig";
import { Utils } from "../../Utils"; import {Utils} from "../../Utils";
/** /**
* An advanced location input, which has support to: * An advanced location input, which has support to:
@ -36,7 +36,10 @@
value.setData(coordinate); value.setData(coordinate);
} }
let preciseLocation: UIEventSource<{ lon: number, lat: number }> = new UIEventSource<{ lon: number; lat: number }>(coordinate); let preciseLocation: UIEventSource<{ lon: number, lat: number }> = new UIEventSource<{
lon: number;
lat: number
}>(coordinate);
const xyz = Tiles.embedded_tile(coordinate.lat, coordinate.lon, 16); const xyz = Tiles.embedded_tile(coordinate.lat, coordinate.lon, 16);
const map: UIEventSource<MlMap> = new UIEventSource<MlMap>(undefined); const map: UIEventSource<MlMap> = new UIEventSource<MlMap>(undefined);
let initialMapProperties: Partial<MapProperties> = { let initialMapProperties: Partial<MapProperties> = {
@ -45,7 +48,7 @@
/*If no snapping needed: the value is simply the map location; /*If no snapping needed: the value is simply the map location;
* If snapping is needed: the value will be set later on by the snapping feature source * If snapping is needed: the value will be set later on by the snapping feature source
* */ * */
location: snapToLayers?.length > 0 ? new UIEventSource<{ lon: number; lat: number }>(coordinate) :value, location: snapToLayers?.length > 0 ? new UIEventSource<{ lon: number; lat: number }>(coordinate) : value,
bounds: new UIEventSource<BBox>(undefined), bounds: new UIEventSource<BBox>(undefined),
allowMoving: new UIEventSource<boolean>(true), allowMoving: new UIEventSource<boolean>(true),
allowZooming: new UIEventSource<boolean>(true), allowZooming: new UIEventSource<boolean>(true),
@ -95,5 +98,5 @@
</script> </script>
<LocationInput {map} mapProperties={initialMapProperties} <LocationInput {map} mapProperties={initialMapProperties}
value={preciseLocation}></LocationInput> value={preciseLocation}></LocationInput>