diff --git a/examples/picker.html b/examples/picker.html index 2aafff0..93a84cc 100644 --- a/examples/picker.html +++ b/examples/picker.html @@ -279,7 +279,7 @@ const tags = [ ...(c.marks || []).map((m) => h('span', { class: 'tag mark', title: 'A Commons quality mark' }, m)), ...(c.restrictions || []).map((r) => h('span', { class: 'tag warn', title: 'A right beside copyright the file names' }, `${r} rights`)), - up ? h('span', { class: 'tag warn', title: 'Smaller than the frame: the service scales it up' }, `scaled up ×${up.toFixed(1)}`) : null, + up ? h('span', { class: 'tag warn', title: 'Smaller than the frame: the service scales it up' }, `scaled up ×${up.toFixed(2)}`) : null, ].filter(Boolean); const chosen = opts.choose && state.chosen && state.chosen.cand && state.chosen.cand.file === c.file; const card = h('article', { class: `photo-card${opts.picked ? ' picked' : ''}${chosen ? ' chosen' : ''}` }, @@ -288,7 +288,8 @@ opts.label ? h('div', { class: 'meta' }, h('b', {}, opts.label)) : null, h('div', { class: 'name' }, c.file), h('div', { class: 'meta' }, - h('b', {}, c.date || 'undated'), + h('b', { title: c.date_from === 'category' ? 'The file gives no date: the season it is filed under' : null }, + c.date ? `${c.date}${c.date_from === 'category' ? ' (its season)' : ''}` : 'undated'), c.width ? ` · ${c.width}×${c.height}` : '', ' · ', c.licence_url ? h('a', { href: c.licence_url, target: '_blank', rel: 'noopener' }, c.licence) : c.licence, h('br'), c.author), @@ -387,6 +388,11 @@ const { key, cand, fileName, fileKey, kind } = state.chosen; const file = state.picks[fileKey]; const existing = file && Object.prototype.hasOwnProperty.call(file, key) ? file[key] : null; + if (kind === 'photo' && !cand.date) { + body.replaceChildren(notice('error', `${cand.file} has no date, and the service refuses an entry without one: run tools/commons_candidates.py again, or choose another.`)); + section.hidden = false; + return; + } const entry = entryFor(existing, kind, cand); const rule = [' ', h('a', { href: F1.linkWithKept('licences.html') }, 'The licences page'), ' states the rule.']; const what = kind === 'satellite' ? 'the satellite, not the map' : kind === 'map' ? 'the dark map instead of the satellite' : cand.file; @@ -453,11 +459,11 @@ // circuit of that country has, checked 2026-11-27) Leaflet scales the deepest tiles up. const NATIONAL = { netherlands: { name: 'PDOK’s aerial photo', url: 'https://service.pdok.nl/hwh/luchtfotorgb/wmts/v1_0/Actueel_orthoHR/EPSG:3857/{z}/{x}/{y}.jpeg', - maxNativeZoom: 19, credit: 'Luchtfoto: PDOK / Beeldmateriaal Nederland', licence: 'CC BY 4.0', poster: 'CC BY 4.0' }, + maxNativeZoom: 19, credit: 'Luchtfoto: PDOK / Samenwerkingsverband Beeldmateriaal, CC BY 4.0', licence: 'CC BY 4.0', poster: 'CC BY 4.0' }, france: { name: 'IGN’s BD ORTHO 2021–2023', url: 'https://data.geopf.fr/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=ORTHOIMAGERY.ORTHOPHOTOS2021-2023&STYLE=normal&TILEMATRIXSET=PM&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=image/jpeg', maxNativeZoom: 18, credit: '© IGN – BD ORTHO, 2021–2023', licence: 'Licence Ouverte (Etalab) 2.0', poster: 'CC BY 4.0' }, 'united-states': { name: 'USGS imagery', url: 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}', - maxNativeZoom: 16, credit: 'Imagery: USGS', licence: 'public domain', poster: 'CC BY 4.0' }, + maxNativeZoom: 16, credit: 'USDA, USGS The National Map: Orthoimagery', licence: 'public domain', poster: 'CC BY 4.0' }, }; const EOX = { name: 'EOxCloudless 2025',