From 0874e8f8ed55d529cb0ad4ba7d819b2b1cf4a3a2 Mon Sep 17 00:00:00 2001 From: Roman Priesol Date: Fri, 11 Sep 2026 16:58:32 +0200 Subject: [PATCH] Add a debug page for comparing offline base-map themes side by side Renders the bare protomaps-themes-base themes next to the app's actual offline/online styles (each real app instance, embedded), with pan/zoom kept in sync via the existing URL-hash mechanism, to make it easy to see where the hand-tuned offline palette diverges from the online one. --- docs/development.adoc | 11 ++++ public/theme_preview.html | 111 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 public/theme_preview.html diff --git a/docs/development.adoc b/docs/development.adoc index 596f28f..7d49a2a 100644 --- a/docs/development.adoc +++ b/docs/development.adoc @@ -23,6 +23,17 @@ explicit cache headers, so an edit to `public/` (or `views/`) can appear not to have taken effect on the next reload. Force a real reload (e.g. Ctrl/Cmd+Shift+R) if that happens. +`/theme_preview.html` is a standalone debug page (not linked from the +app itself) for comparing offline base-map themes side by side: a bare +`protomaps-themes-base` theme, an iframe of the real app's offline +style, and one of its online style, with pan/zoom kept in sync across +all three via the same URL-hash mechanism `map.js` already uses for +shareable links. It's a plain static file, so nothing gates it to +development — it's reachable on a production instance too, same as any +other file under `public/`. Harmless if it stays that way (it shows +nothing `/` doesn't already), but worth knowing if that's ever not the +case. + == Offline map data To enable the offline style, place a PMTiles file at diff --git a/public/theme_preview.html b/public/theme_preview.html new file mode 100644 index 0000000..c5eac67 --- /dev/null +++ b/public/theme_preview.html @@ -0,0 +1,111 @@ + + + + +Offline theme preview + + + + +
+
+
light (bare base theme)
+
+
+
+
offline (current app)
+ +
+
+
online (current app)
+ +
+
+ + + + +