mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-12-02 10:02:12 +00:00
add basemap in basemap tree when missing in embedding mode
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
import { loadFile } from '$lib/logic/file-actions';
|
||||
import { selection } from '$lib/logic/selection';
|
||||
import { untrack } from 'svelte';
|
||||
import { isSelected, toggle } from '$lib/components/map/layer-control/utils';
|
||||
|
||||
let {
|
||||
useHash = true,
|
||||
@@ -32,6 +33,7 @@
|
||||
|
||||
const {
|
||||
currentBasemap,
|
||||
selectedBasemapTree,
|
||||
distanceUnits,
|
||||
velocityUnits,
|
||||
temperatureUnits,
|
||||
@@ -66,6 +68,9 @@
|
||||
if (allowedEmbeddingBasemaps.includes(options.basemap)) {
|
||||
$currentBasemap = options.basemap;
|
||||
}
|
||||
if (!isSelected($selectedBasemapTree, options.basemap)) {
|
||||
$selectedBasemapTree = toggle($selectedBasemapTree, options.basemap);
|
||||
}
|
||||
$distanceMarkers = options.distanceMarkers;
|
||||
$directionMarkers = options.directionMarkers;
|
||||
$distanceUnits = options.distanceUnits;
|
||||
|
||||
Reference in New Issue
Block a user