Easy-to-manage touch screens
무료 오픈소스 터치스크린으로 USB 설정 가이드, 드래그‑드롭 편집기, 로컬 제어를 제공하며 Home Assistant용으로 제작되었습니다
Simple pwa map viewer local-first, privacy first
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Maphop is a lightweight map viewer you open in any modern browser. It gives you:
| Feature | Description |
|---|---|
| 🗺️ Base Maps | 7 built-in maps: Bergfex OSM, OpenStreetMap, OpenFreeMap Liberty, OpenTopoMap, CyclOSM, Esri Satellite, basemap.at Grau, plus optional Thunderforest Outdoors when configured |
| 📍 Live Location | Opt-in GPS tracking with an accuracy circle, heading cone, and follow mode |
| ⭐ Favorites | Crosshair-based save flow, local-only storage in IndexedDB, and one-tap return to saved places |
| 🔗 Favorite Sharing | Share any saved favorite as a deep link; recipients see a pin marker and a banner to add the spot to their own favorites or dismiss |
| 📌 Favorites Overlay | Show all saved favorites as pin markers directly on the map |
| 💾 GeoJSON Backup | Export favorites as GeoJSON and import previously saved favorites from Settings |
| 🏔️ 3D Terrain | Toggle hillshade and terrain exaggeration for a three-dimensional view |
| 🧭 Compass | Appears when the map is rotated or tilted; tap to reset to flat north-up view |
| 🥾 Walking & Hiking Routes | Online route planning with OpenRouteService, using temporary map clicks or an explicitly requested current location |
| 🔄 Re-center | Appears when you pan away from your live location; tap to fly back |
| © Attribution Widget | Compact attribution panel for the active base map and terrain sources |
| 📴 Offline-capable | Service worker caches the app shell for use without connectivity |
| 📲 Installable PWA | Add to your home screen on Android or iOS for a native app feel |
| 🔒 Privacy-first | No accounts, no analytics, explicit CSP allowlists for tile hosts, and strict referrer handling on the live map page |
Visit https://maphop.eu in any modern browser. The map loads immediately — no sign-up required.
Available styles:
Privacy note: The tile provider can infer your approximate area from the map tiles your device requests.
Anyone who opens the shared link will land directly on the same location in Maphop. A pin marker appears at the shared spot and a banner at the top of the screen offers two actions: Add to Favorites (saves the location straight to their own favorites list) or ✕ to dismiss the pin and banner.
Open Settings from the menu footer to export favorites as GeoJSON or import a previously saved favorites file.
Android (Chrome): An install banner appears at the bottom of the screen — tap Install to add Maphop to your home screen.
iOS (Safari): Tap the Share button then Add to Home Screen.
Once installed, Maphop opens in full-screen mode and works offline using cached tiles from previous sessions.
💡 Visit the live demo at maphop.eu to see the app in action.
# Clone the repository
git clone https://github.com/mdiener21/maphop.git
cd maphop
# Install dependencies
npm install
# Optional: enable Thunderforest Outdoors locally
printf 'VITE_THUNDERFOREST_API_KEY=your-key-here\n' > .env.local
# Optional: enable walking and hiking routing locally
# Add your own OpenRouteService key locally; never commit it.
printf 'VITE_OPENROUTESERVICE_API_KEY=your-key-here\n' >> .env.local
# Start the Vite dev server with hot-module replacement
npm run dev
Open http://localhost:5173 in your browser. Changes to source files in src/ are reflected immediately without a full reload.
.env.local is gitignored. Do not commit personal API keys.
If you enable Thunderforest Outdoors, keep in mind that this is a browser-rendered tile layer: the key stays out of the repository, but it is still visible to users of a deployed build. Restrict the key in your Thunderforest account to the intended domains and usage limits.
Routing uses the same browser-rendered configuration. This change does not add an OpenRouteService key to any .env file. A VITE_ value is included in a client build, so use a domain-restricted, quota-limited key; use a server-side proxy if the credential must remain secret.
# Run unit tests once
npm test
# Run unit tests in watch mode (re-runs on file save)
npm run test:watch
# Run unit tests with a V8 coverage report
npm run test:coverage
# Run end-to-end tests (Playwright, requires Firefox)
npm run test:e2e
Unit tests live in tests/unit/ and currently cover attribution rendering, base-layer switching, install prompts, menu state, favorites transfer/store logic, location tracking, terrain lifecycle, and share-link helpers. End-to-end tests live in tests/e2e/ and exercise the map page, settings page, impressum page, and inter-page navigation.
npm run build
The production-ready static site is output to the dist/ directory. You can preview it locally before deploying:
npm run preview
Open http://localhost:4173 to verify the built output.
Maphop is a fully static site — dist/ contains only HTML, CSS, JavaScript, and assets. You can host it on any static file host (Netlify, Vercel, GitHub Pages, a plain FTP server, etc.).
Automated deployment is handled by the GitHub Actions workflow in .github/workflows/deploy.yml. On every push to main it:
npm ci to install dependencies.npm run build to produce dist/.dist/ to the configured FTP host via lftp.To use the workflow you need two repository secrets:
| Secret | Description |
|---|---|
FTP_USER | FTP username for your hosting account |
FTP_PASSWORD | FTP password for your hosting account |
For a manual deployment, copy the contents of dist/ to the public_html/ (or equivalent) directory on your web server.
Service worker path: The service worker is registered at the root (
/sw.js). Ensure your hosting configuration serves the app from/and does not rewrite the service worker URL.