diff --git a/index.html b/index.html index 40ae446..b81e4be 100644 --- a/index.html +++ b/index.html @@ -4375,8 +4375,8 @@ // ===================== // FANTASY MAP STYLE // ===================== - // Default fantasy colors (can be customized via settings) - const mapColors = { + // Default fantasy colors (can be customized via Theme Editor) + const defaultMapColors = { land: '#1a1a2e', water: '#0f3460', roads: '#e94560', @@ -4384,6 +4384,19 @@ parks: '#1b4332' }; + // Load active theme from localStorage (set by Theme Editor) + let mapColors = { ...defaultMapColors }; + try { + const savedTheme = localStorage.getItem('hikemap_active_theme'); + if (savedTheme) { + const parsed = JSON.parse(savedTheme); + mapColors = { ...defaultMapColors, ...parsed }; + console.log('Loaded custom map theme:', mapColors); + } + } catch (e) { + console.log('Using default map colors'); + } + // Build the fantasy map style function buildFantasyStyle(colors, use3dBuildings = true) { return { diff --git a/maplibre-test.html b/maplibre-test.html index 7c64c7c..350b0ea 100644 --- a/maplibre-test.html +++ b/maplibre-test.html @@ -3,7 +3,7 @@
-This will save the current colors as the active theme used in HikeMap.
+