Skip to content

Feature Request #553: add separate toggle for DE/DX markers in Map Layers#653

Merged
accius merged 1 commit intoaccius:Stagingfrom
echo-gravitas:echo-gravitas/issue-553
Mar 2, 2026
Merged

Feature Request #553: add separate toggle for DE/DX markers in Map Layers#653
accius merged 1 commit intoaccius:Stagingfrom
echo-gravitas:echo-gravitas/issue-553

Conversation

@echo-gravitas
Copy link
Contributor

@echo-gravitas echo-gravitas commented Mar 2, 2026

This PR implements Feature Request #553.

Previously, the DE and DX markers on the map could not be hidden independently. This change adds a dedicated DE/DX Markers option in Settings -> Map Layers.

What changed

  • Added a new map-layer toggle: DE/DX Markers.
  • The DE and DX markers in WorldMap are now rendered only when that option is enabled.
  • The setting is persisted alongside the other map-layer preferences in openhamclock_mapLayers.
  • The new option was integrated into the existing Map Overlays section in the Settings panel.
  • The Map Overlays section was moved to the top of the layer list.
  • Toggling now takes effect immediately without requiring a manual page reload.
  • Also fixed an existing DX News Ticker issue:
    • disabling it hid it correctly,
    • but re-enabling it did not always show it again immediately.
    • Root cause was missing synchronization between the ticker's internal visibility state and updated mapLayers.
    • useMapLayers now dispatches a mapLayersChanged event so the ticker updates immediately in the same tab.

Note

I had to run npm i because package.json and package-lock.json were out of sync. The lockfile was updated accordingly.

@accius accius merged commit eee4703 into accius:Staging Mar 2, 2026
@accius
Copy link
Owner

accius commented Mar 2, 2026

Nice PR — clean implementation, merging now. One fix I'm applying post-merge:

In src/components/SettingsPanel.jsx, the category rendering loop allows the overlay category to render when grouped['overlay'] is undefined (because hasBuiltInOverlays is true). The built-in overlay cards render fine, but then it hits:

grouped[key].forEach((layer) => {

This throws TypeError: Cannot read properties of undefined if no plugin layers have category: 'overlay' loaded (fresh install, plugin load failure, etc.). Fixed with:

(grouped[key] || []).forEach((layer) => {

Thanks for the contribution! 73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants