mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-09-02 08:42:31 +00:00
renaming
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import GPXMapLayers from '$lib/components/gpx-layer/GPXMapLayers.svelte';
|
import GPXLayers from '$lib/components/gpx-layer/GPXLayers.svelte';
|
||||||
import ElevationProfile from '$lib/components/ElevationProfile.svelte';
|
import ElevationProfile from '$lib/components/ElevationProfile.svelte';
|
||||||
import FileList from '$lib/components/FileList.svelte';
|
import FileList from '$lib/components/FileList.svelte';
|
||||||
import GPXData from '$lib/components/GPXData.svelte';
|
import GPXData from '$lib/components/GPXData.svelte';
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<Toolbar />
|
<Toolbar />
|
||||||
<Map class="h-full" />
|
<Map class="h-full" />
|
||||||
<LayerControl />
|
<LayerControl />
|
||||||
<GPXMapLayers />
|
<GPXLayers />
|
||||||
<FileList />
|
<FileList />
|
||||||
</div>
|
</div>
|
||||||
<div class="h-60 flex flex-row gap-2 overflow-hidden border">
|
<div class="h-60 flex flex-row gap-2 overflow-hidden border">
|
||||||
|
@@ -41,7 +41,7 @@ function decrementColor(color: string) {
|
|||||||
colorCount[color]--;
|
colorCount[color]--;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GPXMapLayer {
|
export class GPXLayer {
|
||||||
map: mapboxgl.Map;
|
map: mapboxgl.Map;
|
||||||
file: Writable<GPXFile>;
|
file: Writable<GPXFile>;
|
||||||
layerId: string;
|
layerId: string;
|
@@ -1,10 +1,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { map, files, selectedFiles, getFileStore } from '$lib/stores';
|
import { map, files, selectedFiles, getFileStore } from '$lib/stores';
|
||||||
import type { GPXFile } from 'gpx';
|
import type { GPXFile } from 'gpx';
|
||||||
import { GPXMapLayer } from './GPXMapLayers';
|
import { GPXLayer } from './GPXLayer';
|
||||||
import { get, type Writable } from 'svelte/store';
|
import { get, type Writable } from 'svelte/store';
|
||||||
|
|
||||||
let gpxLayers: Map<Writable<GPXFile>, GPXMapLayer> = new Map();
|
let gpxLayers: Map<Writable<GPXFile>, GPXLayer> = new Map();
|
||||||
|
|
||||||
$: if ($map) {
|
$: if ($map) {
|
||||||
gpxLayers.forEach((layer, file) => {
|
gpxLayers.forEach((layer, file) => {
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
});
|
});
|
||||||
$files.forEach((file) => {
|
$files.forEach((file) => {
|
||||||
if (!gpxLayers.has(file)) {
|
if (!gpxLayers.has(file)) {
|
||||||
gpxLayers.set(file, new GPXMapLayer(get(map), file));
|
gpxLayers.set(file, new GPXLayer(get(map), file));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
Reference in New Issue
Block a user