fix(satellites): class choices survive a reload and travel in share links

Only catalog and the tracked satellite were saved for the layer, so a class
chip lasted until the next reload and no share link carried it. The choice
is now the satellites option `classes`: one letter per class shown
(`sitpd` by default, `0` for none), with Starlink left to `catalog`, and
the layer takes the letters back through setParams. A partial request
(`{debris: false}`) hides only what it names.
This commit is contained in:
Sameh Khamis committed 2026-11-08 15:16:01 -08:00
1 parent 8ae56587c3
commit c84cfcadeb
9 files changed
+148 -12

No files matched your search

+11
View File
@@ -2,6 +2,7 @@
// Local, not i18n/marker.js: the token-ledger tests run this file in isolation.
const msg = (text) => text;
import { normalizeIdSwitches, patchRequestedIdSwitches } from './idSwitches.js';
import { normalizeSatelliteClassMask } from './satelliteClassMask.js';
import reservationRows from './layerStateTokenReservations.json' with { type: 'json' };
const VALID_DISPOSITIONS = new Set([
@@ -416,6 +417,16 @@ const OPTION_GROUPS = Object.freeze({
dense: 'd',
}),
integerOption('selectedSatTrackingId', 't', null),
// Every class but Starlink shows by default (satellites/classes.js).
Object.freeze({
key: 'classes',
token: 'k',
defaultValue: 'sitpd',
normalize: normalizeSatelliteClassMask,
encode: (value) => value,
decode: (value) =>
typeof value === 'string' ? normalizeSatelliteClassMask(value) : null,
}),
]),
cctv: Object.freeze([
enumOption('coverageMode', 'c', 'on', ['off', 'on', 'viewshed'], {