Draw a picked photo only with bg=photo, keep bg=satellite to aerial imagery

The operator judged the Commons-photo poster unfit as a default: its crop lands beside the circuit and shows the
track only as an inset. bg=satellite is now the national aerial photo, else EOxCloudless (or the dark map where
"use": "map" is set); the new bg=photo draws the layout's picked photo and without one falls back to what
bg=satellite draws. A picks entry may hold the photo fields, "use": "map", or both; an unknown use and incomplete
photo fields are refused at load. The smallest width is 400 px so the full credit line stays readable, and the
ASCII credit header spells out ß, æ, ø, œ and đ so names stay readable.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
This commit is contained in:
2026-11-27 15:18:09 +01:00
parent d514eb57a3
commit 4362e2d10b
7 changed files with 89 additions and 49 deletions
+7 -6
View File
@@ -31,14 +31,15 @@ How posters are made (sources and their licences, kept layers, options, credits)
| `GET /licences` | every source a picture may be made from: its licence, its credit and its terms, and how a picture's licence follows from them |
The three picture routes take the same options as query parameters ([docs/posters.md](docs/posters.md) lists
them): `style` (`classic`, `minimal`), `bg` (`satellite`, its alias `aerial`, `osm`, `dark`, `light`, `none`),
them): `style` (`classic`, `minimal`), `bg` (`satellite`, its alias `aerial`, `photo`, `osm`, `dark`, `light`, `none`),
`photo` (`natural`, `bw`), `show` (a comma list of `wordmark`, `round`, `name`, `subtitle`, `date`, `circuit`,
`locality`, `session`), `locator` and `checker` (`on`, `off`), `track` (`off`, or a colour with an optional width,
`#ffffff,6`), `dim` (0 to 1), `accent` (a colour), `width` (200 up to the picture's own) and `format` (`png`, `jpg`,
`webp`). An unknown option or value is answered 422, naming it. `bg=satellite` takes the layout's picked Wikimedia
Commons photo, else the national aerial photo (USGS in the United States, PDOK in the Netherlands, IGN in France),
else EOxCloudless; [circuits/photos.json](circuits/photos.json) holds the picks, and `{"use": "map"}` there makes a
layout draw the dark map instead of EOxCloudless. Every picture carries the credit line of its sources at its
`#ffffff,6`), `dim` (0 to 1), `accent` (a colour), `width` (400 up to the picture's own) and `format` (`png`, `jpg`,
`webp`). An unknown option or value is answered 422, naming it. `bg=satellite` takes the national aerial photo
(USGS in the United States, PDOK in the Netherlands, IGN in France), else EOxCloudless; `{"use": "map"}` for a
layout in [circuits/photos.json](circuits/photos.json) makes it draw the dark map instead of EOxCloudless. `bg=photo`
takes the layout's picked Wikimedia Commons photo from that file, with the track as an inset, and without a pick
falls back to `bg=satellite`; no style takes it by default. Every picture carries the credit line of its sources at its
bottom and in `X-Credits`, its licence in `X-License` (it follows its sources), and `Link: </licences>; rel="license"`.
An unknown country, locality, circuit or layout, or a year no layout of the circuit covers, is answered 404, naming it.