Skip to content

Refactor: map-only view with free relief basemap - #133

Draft
aivanchenk wants to merge 6 commits into
mainfrom
refactor/map-only-relief
Draft

aivanchenk wants to merge 6 commits into
mainfrom
refactor/map-only-relief

Conversation

@aivanchenk

Copy link
Copy Markdown
Collaborator

What

The map is now the whole page. It uses a new basemap that renders terrain from free elevation tiles instead of the flat OpenFreeMap Positron/Dark styles.

  • Basemap (src/lib/map/reliefStyle.ts): Mapterhorn elevation tiles drawn with MapLibre's built-in color-relief (tint by elevation) and hillshade (four light directions), plus OpenFreeMap water, country borders and labels. On the globe, sky adds the atmosphere. There are light and dark palettes, switched by the theme toggle. No API keys and no paid services.
  • Page (src/components/map/ReliefMap.tsx): only the map, a Plan/Sphere switch at the top, a locate button and the theme toggle. Dragging works. Clicking the map does nothing for now.
  • UserPositionMarker is moved out of EarthMap so both can use it.
  • EarthMap and the sidebar, readout, search, tour and export components are unchanged. They're no longer rendered on /map, but they stay in the tree to be brought back later.
  • Removes .worktrees/restore-year-grid, which was accidentally committed as a submodule entry in b6244b8.

Checks

  • npm test (222 passing, including new reliefStyle.test.ts), tsc, npm run build
  • Driven in Chrome: globe and flat map in light and dark, dragging, locate (flies to the Alps), clicking does nothing, 390px width has no horizontal scroll. The only tile hosts contacted are tiles.mapterhorn.com and tiles.openfreemap.org.

Known follow-ups

  • Near the edge of the globe, a few labels draw slightly past the rim.
  • On phones, the globe at the default zoom is a bit wider than the screen.

Note for reviewers

After pulling, run npm install. It re-copies the MapLibre worker into public/. Without it, tiles download but never draw.

Anastasiia Ivanchenko added 2 commits September 27, 2026 14:46
Replace the OpenFreeMap Positron/Dark basemap with a style built from
Mapterhorn elevation tiles: hypsometric color-relief, multidirectional
hillshade, OpenFreeMap water, borders and labels, and a globe
atmosphere. Light and dark palettes follow the theme toggle.

For the refactor, /map now renders only the map with a Plan/Sphere
switch, a locate button and the theme toggle. Clicks do nothing.
EarthMap and the other components stay in the tree, unused.
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

🚀 Vercel preview deployed

Preview URL: https://earth-prints-6y71ecj5m-anastasiia-s-projects10.vercel.app

@aivanchenk
aivanchenk marked this pull request as draft September 27, 2026 19:19
@aivanchenk

Copy link
Copy Markdown
Collaborator Author

@lazarusA tagging you here just FYI that is the branch for UI refactoring, so you could see the progress here as it takes a long time to complete it

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.

1 participant