Map block: Google and Apple Maps buttons, a zoomable picture, links land at the map's top

Migration 091 adds google_maps_url and apple_maps_url to
venue_locations, shown as buttons at the right of each location's
row. The picture zooms (1x to 4x) and scrolls in its box. A link to a
location now scrolls to the top of the map block, not the mark.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-11-11 03:04:14 -06:00
parent 8a79206998
commit 6a0271efd9
6 changed files with 128 additions and 12 deletions

View file

@ -1,4 +1,4 @@
import { text, real } from "./columns.js";
import { text, real, url } from "./columns.js";
/* ── Venues (088_venues.sql) ─────────────────────────────────────
@ -38,6 +38,9 @@ export const venues = {
real("y"),
real("w"),
real("h"),
// The place in Google and Apple Maps (091).
url("google_maps_url"),
url("apple_maps_url"),
],
},
],

View file

@ -0,0 +1,10 @@
-- ═══════════════════════════════════════════════════════════════
-- 091 A VENUE LOCATION'S MAP LINKS
--
-- Each location on a venue's map can link to the same place in
-- Google Maps and Apple Maps, shown as buttons beside it in a map
-- block's list. Null shows no button.
-- ═══════════════════════════════════════════════════════════════
ALTER TABLE venue_locations ADD COLUMN google_maps_url TEXT;
ALTER TABLE venue_locations ADD COLUMN apple_maps_url TEXT;

View file

@ -202,7 +202,7 @@ function attachVenues(db, blocks) {
);
const locationRows = db
.prepare(
`SELECT venue_id, location_key AS key, name, detail, x, y, w, h
`SELECT venue_id, location_key AS key, name, detail, x, y, w, h, google_maps_url, apple_maps_url
FROM venue_locations
WHERE venue_id IN (${placeholders(ids.length)})
ORDER BY venue_id, sort_order`,