mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
feat: describe what the app shows as a view
A view is a camera, data layers, visual style, map imagery and an aircraft, military aircraft or satellite to follow, written in the share-link format the app already restores. gods-eye-view/view builds, encodes and decodes one, and share links take their style names from it. open_in_gods_eye_view now builds its link from a full view: an area or camera, layers, style, map and something to follow.
This commit is contained in:
1 parent
de1e0836b3
commit
96a8a9addb
10 files changed
+463
-72
No files matched your search
+3
-10
@@ -9,6 +9,7 @@ import {
|
||||
decodeLayerStateParams,
|
||||
encodeLayerStateParams,
|
||||
} from './data/layerState.js';
|
||||
import { STYLE_URL_NAMES } from './view/index.js';
|
||||
|
||||
/**
|
||||
* Share Links — URL Hash State Management
|
||||
@@ -20,16 +21,8 @@ import {
|
||||
const DEBOUNCE_MS = 500;
|
||||
const LEGACY_BLOOM_FALLBACK = 50;
|
||||
|
||||
// Style name mapping: internal → URL-friendly
|
||||
const STYLE_TO_URL = {
|
||||
normal: 'normal',
|
||||
retro: 'crt',
|
||||
surveillance: 'nvg',
|
||||
thermal: 'flir',
|
||||
anime: 'anime',
|
||||
noir: 'noir',
|
||||
snow: 'snow',
|
||||
};
|
||||
// Style name mapping: internal → URL-friendly, shared with views.
|
||||
const STYLE_TO_URL = STYLE_URL_NAMES;
|
||||
|
||||
const SHARE_UI_STATE_PARAM = 'ui';
|
||||
const SHARE_STYLE_PARAMS_PARAM = 'sp';
|
||||
|
||||
Reference in new issue
Block a user