fix: slim pin geometry, r/d=0.35 opening angle 20deg
Some checks failed
Build & Push marker-api / build (push) Failing after 4s
Some checks failed
Build & Push marker-api / build (push) Failing after 4s
Was: r=35.5% of size -> r/d=0.59 -> 36 deg opening -> fat oval Now: r=24% of size -> r/d=0.35 -> 20 deg opening -> proper Google Maps pin shape
This commit is contained in:
parent
3960c9c5c1
commit
9367ba5b6b
4 changed files with 18 additions and 15 deletions
|
|
@ -237,7 +237,7 @@ docker compose logs -f tileserver # Raster-Rendering
|
||||||
- Image: `192.168.178.6:8083/cschulz/rd13_tile_server-marker-api:latest` (Forgejo Registry)
|
- Image: `192.168.178.6:8083/cschulz/rd13_tile_server-marker-api:latest` (Forgejo Registry)
|
||||||
- API Root: `http://localhost:9984`
|
- API Root: `http://localhost:9984`
|
||||||
- Endpunkt: `/styles/v4/marker/{type}+{hexcolor}(@{scale}x).png`
|
- Endpunkt: `/styles/v4/marker/{type}+{hexcolor}(@{scale}x).png`
|
||||||
- Typen: `pin-s` (24px), `pin-m` (32px), `pin-l` (40px); Canvas quadratisch, 80% opak
|
- Typen: `pin-s` (24px), `pin-m` (32px), `pin-l` (40px); Canvas quadratisch, 80% opak, schlanke Teardrop-Form (r/d≈0.35)
|
||||||
- Image neu bauen: `docker compose build marker-api && docker compose up -d marker-api`
|
- Image neu bauen: `docker compose build marker-api && docker compose up -d marker-api`
|
||||||
- CI: Forgejo baut + pusht automatisch bei Änderungen in `services/marker-api/`
|
- CI: Forgejo baut + pusht automatisch bei Änderungen in `services/marker-api/`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,9 +110,12 @@ Geometry-Fix: r=35.5% der Breite, tipY=97.5%, Spitze passt jetzt sauber in die C
|
||||||
### Prompt 12
|
### Prompt 12
|
||||||
«Aber ich will doch das es in media wiki gut aussieht also muss es in 32x32 passen und gut aussehen. wäre es auch möglich ihn etwas durchsichtig zu machen?»
|
«Aber ich will doch das es in media wiki gut aussieht also muss es in 32x32 passen und gut aussehen. wäre es auch möglich ihn etwas durchsichtig zu machen?»
|
||||||
|
|
||||||
### Antwort 12
|
### Prompt 13
|
||||||
Zurück auf quadratische Canvas (pin-m=32×32 @1x, 64×64 @2x) mit optimierter Geometrie:
|
«Das sieht aber immer noch komisch aus...»
|
||||||
- `r=35.5%` der Breite (statt 29%) → Kreis füllt Canvas besser aus
|
|
||||||
- `tipY=97.5%` → Spitze immer noch vollständig sichtbar
|
### Antwort 13
|
||||||
- 80% Transparenz: `fill.A=204`, `white.A=220`
|
Ursache identifiziert: `r/d = 0.59` (Kreisradius / Abstand zur Spitze) → Öffnungswinkel 36° → Tangenten laufen flach aus → Form sieht aus wie ein Oval.
|
||||||
- Verifiziert: `pin-m@2x = 64×64px PNG`
|
|
||||||
|
Fix: `r = size * 0.24` (statt 0.355) → `r/d ≈ 0.35` → Öffnungswinkel 20° → schlanker Pin.
|
||||||
|
|
||||||
|
Verifiziert mit blauen Test-Pin (±4285F4): sieht jetzt aus wie Google-Maps-Pin.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# PROJECT_CONTEXT – rd13_tile_server
|
# PROJECT_CONTEXT – rd13_tile_server
|
||||||
|
|
||||||
**Letzte Aktualisierung:** 2026-07-01 – ✅ **Marker-API**: Go-Service für Maptiler-kompatible Marker-Endpunkte (`/styles/v4/marker/*`) hinzugefügt. 32×32px Canvas, 80% Transparenz, Google-Maps-Teardrop-Form. Forgejo CI baut + pusht Image in lokale Container-Registry.
|
**Letzte Aktualisierung:** 2026-07-01 – ✅ **Marker-API**: Go-Service für Maptiler-kompatible Marker-Endpunkte (`/styles/v4/marker/*`). 32×32px Canvas, schlanker Teardrop-Pin (`r/d≈0.35`, Öffnungswinkel 20°), 80% Transparenz. Forgejo CI baut + pusht Image in lokale Container-Registry.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -156,14 +156,14 @@ func generateMarker(pinType, hexColor string, scale float64) ([]byte, error) {
|
||||||
size = 12
|
size = 12
|
||||||
}
|
}
|
||||||
|
|
||||||
// Geometrie: Teardrop in quadratische Canvas einpassen
|
// Geometrie: schlanker Google-Maps-Pin
|
||||||
// Kreis füllt obere 3/4, Spitze landet am unteren Rand
|
// r/d ≈ 0.35 → Öffnungswinkel ~20° → Pin sieht spitz aus, nicht oval
|
||||||
cx := size / 2
|
cx := size / 2
|
||||||
r := size * 0.355 // Kreisradius (rechts/links je 1px Puffer für Rand)
|
r := size * 0.24 // kleiner Kreis → langer, schlanker Schwanz
|
||||||
cy := r + size*0.02 // Kreismittelpunkt Y (kleiner oberer Rand)
|
cy := r + size*0.02 // Kreismittelpunkt oben
|
||||||
tipY := size * 0.975 // Spitze Y (knapp vor unterem Rand)
|
tipY := size * 0.975 // Spitze am unteren Rand
|
||||||
borderW := math.Max(1.2, size*0.045) // Randbreite
|
borderW := math.Max(1.5, size*0.05) // Randbreite
|
||||||
innerR := r * 0.36 // weißer Innenpunkt
|
innerR := r * 0.40 // weißer Innenpunkt (etwas größer für Sichtbarkeit)
|
||||||
|
|
||||||
// Transparenz: 80% opak (Alpha 204)
|
// Transparenz: 80% opak (Alpha 204)
|
||||||
fillBase := hexToColor(hexColor)
|
fillBase := hexToColor(hexColor)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue