Herbstausfahrt Logo

Herbstausfahrt

Interactive Leaflet live map displaying participant vehicles, excursion POIs, and a dynamically computed fair meeting point.

🇬🇧 English · 🇩🇪 Deutsch


Overview

Herbstausfahrt (Auto-Karte) is a static, zero-build Leaflet web application built for planning group road trips. It renders participant starting locations with custom top-down car icons, dynamically computes a fair central meeting point for all active drivers, and overlays curated food stops and regional sightseeing POIs across Germany.

Hosted instance target: https://karte.orfel.de/

┌───────────────────────────────────────────────────────────┐
│   Static Web App (index.html + js/app.js + js/math.js)    │
│   • Leaflet 1.9.4 + OpenStreetMap Tiles                   │
│   • Minimax 1-Center Fair Meeting Point                   │
│   • Screen-Space Vehicle Marker Collision Resolution      │
└──────────────┬────────────────────────┬───────────────────┘
               │                        │
               ▼                        ▼
      locations.json            essen.json (62) & poi.json (202)
   (9 vehicle entries)        (Grillen, McDonald's, Castles, etc.)

Features

  • Interactive OpenStreetMap & Light/Dark Map Toggle: Built on Leaflet 1.9.4 with OpenStreetMap tiles, a floating Light/Dark map style switcher (btn-toggle-dark), and a Fit-Bounds overview button (btn-fit-bounds).
  • Custom Car & POI Icons: 68×68 px transparent top-down vehicle icons and 34×34 px POI icons rendered on separate z-index panes (poiPane at 500, markerPane at 600, meetingPane at 650).
  • Dynamic Fair Meeting Point (js/math.js): Computes the optimal central meeting point using a Minimax 1-Center (Chebyshev center) subgradient algorithm (150 iterations with Haversine great-circle distance) that minimizes the maximum travel distance for the furthest participant. Nearby start locations (< 0.5 km apart) are deduplicated so multiple drivers from the same town count once.
  • Meeting Point Controls & Google Maps Navigation: Pulsing radar meeting marker (meeting-point.png), dashed red connection lines (#ef4444) to each active driver, independent toggles for the meeting pin and connection lines, "Jump to Meeting Point" button, and direct Google Maps route links in popups and the sidebar.
  • Screen-Space Collision Resolution: Dynamically separates overlapping car icons in pixel space on zoom/pan (minimum 74 px screen spacing, deterministic horizontal spread sorted by name for co-located drivers) and converges markers onto their exact coordinates when zooming in.
  • Per-Pin & Bulk Participant Toggles: Randomized participant order on reload (Fisher-Yates shuffle), individual checkboxes in the sidebar (all enabled by default), an All off/on (btn-toggle-all) toggle, and click-to-fly-to-marker cards.
  • Food & Excursion POI Layers: Toggleable slider switches in the sidebar for:
    • Food (essen.json, 62 entries): Grillen (grillplatz) and McDonald's (mcdonalds).
    • Excursions (poi.json, 202 entries): Old Towns (altstadt, viertel, tor), Archaeology & Culture (archaeologie, park, industriekultur), Castles & Palaces (burg, schloss, festung, gedenkstaette, denkmal, rathaus, sehenswuerdigkeit), and Monasteries & Churches (kloster, kirche).
  • Mobile-Responsive Dark UI: Collapsible mobile sidebar drawer (btn-toggle-sidebar), touch-friendly controls, and Open Graph / Twitter Card metadata.

How It Works & Tech Stack

Component Technology
Mapping Library Leaflet 1.9.4 with OpenStreetMap tile layer
Frontend Vanilla HTML5, CSS3 (css/style.css), and JavaScript (js/app.js, js/math.js)
Data Storage Static JSON files (locations.json, essen.json, poi.json)
Container Runtime nginx:alpine serving static assets on port 80 (mapped to 8080 in Docker Compose)
Privacy locations.json stores only first names, city names, coordinates, and car info (GDPR-friendly)

Prerequisites & Installation

Prerequisites

  • Docker & Docker Compose, or any static web server (e.g., Nginx, Caddy, or Python http.server for local testing).

Option 1: Docker Compose (Local Development & Testing)

git clone https://git.orfel.de/Orfel-HermesAI-Bot/Herbstausfahrt.git
cd Herbstausfahrt
docker compose up -d

docker-compose.yml mounts the repository directory read-only into /usr/share/nginx/html and exposes the map at http://localhost:8080.

Option 2: Static Hosting with Nginx (karte.orfel.de)

cd /var/www/
git clone https://git.orfel.de/Orfel-HermesAI-Bot/Herbstausfahrt.git karte.orfel.de

Example Nginx virtual host:

server {
  server_name karte.orfel.de;
  root /var/www/karte.orfel.de;
  index index.html;
}

To update on the server:

cd /var/www/karte.orfel.de
git pull

(Optional auto-deploy: configure a Gitea webhook triggering /usr/local/bin/deploy-karte.sh to run git pull.)


Configuration

locations.json Schema (Participants)

locations.json is a JSON array (currently 9 entries). Each entry uses these case-sensitive fields:

{
  "Name":  "Jannik",
  "Ort":   "Olbernhau",
  "Lat":   50.6659,
  "Lon":   13.3422,
  "Icon":  "ford-fiesta-schwarz",
  "Auto":  "Ford Fiesta",
  "Farbe": "Schwarz"
}
Field Type Description
Name string Participant first name
Ort string Home city (shown in sidebar & popup)
Lat float Latitude (decimal, OSM)
Lon float Longitude (decimal, OSM)
Icon slug Matches icons/<Icon>.png (falls back to ford-fiesta-schwarz.png if missing)
Auto string Human-readable vehicle model (e.g., "Ford Fiesta")
Farbe string Vehicle color (e.g., "Schwarz")

Icon Naming Convention: <brand-slug>-<model-slug>-<color-slug>.png (lowercase, umlauts replaced: ü→u, ä→a, ö→o).

Available vehicle icons in icons/:

  • ford-fiesta-gruen.png
  • ford-fiesta-schwarz.png
  • ford-mondeo-weiss.png
  • opel-kadett-rot.png
  • seat-cupra-blau.png
  • skoda-octavia-schwarz.png
  • skoda-octavia-weiss.png
  • vw-golf-schwarz.png
  • vw-scirocco-schwarz.png

poi.json & essen.json Schema

Both poi.json (202 entries) and essen.json (62 entries) use lowercase field names:

{
  "name": "Burg Eltz",
  "category": "burg",
  "lat": 50.205071,
  "lon": 7.336772,
  "note": "Burg",
  "icon": "burg-schloss"
}
Field Type Description
name string Display name of the POI
category string Category slug mapped to an icon in POI_ICON_BY_CATEGORY
lat / lon float Decimal coordinates
note string (optional) Short subtitle shown in popup
icon string (optional) Explicit icon slug override (altstadt, archaeologie, burg-schloss, grillen, kloster, mc-donalds)

Usage

Using the Map

  1. Open the map (http://localhost:8080 locally or your hosted URL).
  2. Toggle individual drivers in Teilnehmer & Standorte or click Alle aus/ein; the central meeting point and dashed connection lines recalculate automatically whenever at least 2 drivers are active.
  3. Click any driver card in the sidebar to fly to their location and open their popup with a Route in Google Maps button.
  4. Use the Treffpunkt card to jump to the meeting point, open directions in Google Maps, or toggle the meeting marker and dashed lines.
  5. Toggle Essen (Grillen, McDonald's) and Ausflugsziele (Altstädte, Archäologie & Kultur, Burgen & Schlösser, Klöster & Kirchen) independently.
  6. Use the top-right floating buttons for Übersicht (fit all active markers) and Light Map / Dark Map.

Adding a New Location

  • Via Hermes Chat (Discord/Telegram): Send a message such as "Jannik, Olbernhau, Schwarzer Fiesta" and Hermes updates locations.json and pushes to main.
  • Manually: Edit locations.json with a new entry following the schema above and ensure icons/<Icon>.png exists.

Adding a New Car Icon

  1. Add a transparent top-down PNG (approx. 256×256 px, sticker style) at icons/<slug>.png.
  2. Set "Icon": "<slug>" in locations.json (makeCarIcon() loads it dynamically—no code changes needed).

Project Structure

Herbstausfahrt/
├── css/
│   └── style.css            # Dark theme, sidebar, mobile drawer, map & popup styles
├── icons/                   # 9 vehicle PNGs, 6 POI PNGs, and meeting-point.png
├── js/
│   ├── app.js               # Leaflet initialization, collision resolution, POI & sidebar logic
│   └── math.js              # Haversine distance & Minimax 1-Center meeting point solver
├── index.html               # App shell, Open Graph tags, sidebar switches & map container
├── locations.json           # Participant vehicle locations (9 entries)
├── essen.json               # Food POIs: Grillen & McDonald's (62 entries)
├── poi.json                 # Sightseeing & cultural POIs (202 entries)
├── apple-touch-icon.png     # App icon (180×180)
├── favicon.png / .svg       # Browser favicons
├── og-image.jpg / .png      # Social link preview images
├── Dockerfile               # Nginx Alpine static container
└── docker-compose.yml       # Local container setup on port 8080

License

This project's own code and configuration are dedicated to the public domain under CC0 1.0 Universal — see LICENSE.

External dependencies installed via package managers or Docker images retain their respective open-source licenses.

S
Description
Interaktive Leaflet-Karte mit Orten der Herbstausfahrt, bunten Auto-Icons, Treffpunkt-Berechnung und Per-Pin-Toggle.
Readme CC0-1.0
39 MiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 47.7%
CSS 34.1%
HTML 17.9%
Dockerfile 0.3%