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