diff --git a/DX-MAPS-GALLERY.md b/DX-MAPS-GALLERY.md index 5c05f3b2..b8f4e56e 100644 --- a/DX-MAPS-GALLERY.md +++ b/DX-MAPS-GALLERY.md @@ -10,7 +10,7 @@ on the site loads from the same build tree. | | | |---|---| -| `public/dx-maps/` | **The dx-maps output folder, dropped in** (doxa-maps `development` 1bbc5ff87, `public/dx-maps/`, copied unchanged). Every map on this site loads from it, same-origin. | +| `public/dx-maps/` | **The dx-maps output folder, dropped in** (doxa-maps `development` cff06fb8e, `public/dx-maps/`, copied unchanged). Every map on this site loads from it, same-origin. | | `app/pages/deep-research/index.vue` | **Deep Research: the Research Gallery.** The page loads one script (`/dx-maps/doxa-maps-spa/doxa-maps-spa.js`) and adds one element (``), sized to the viewport below the header; its `tree-base` is built at runtime from the page's own origin. It gives the gallery `profile-config` `{"experimental": false}`, so the gallery's Experimental folder is hidden (galleries built before that flag ignore it). Hidden: in no menu, `robots: noindex`. | | `app/pages/research/index.vue` | **The Research page, DX Life's own:** the heading, the "By Region" link and the UUPG list, with the production simple map (`doxa-simple-map`) carrying the Engagement, Prayer and Adoption tabs, the same map the home, pray and adopt pages each show one tab of. | | `app/pages/regions/index.vue`, `app/utils/nav.ts`, `nuxt.config.ts` | `/regions` is DX Life's own index again, with its menu item, and `/countries` goes to it (`USE_LEGACY_REGIONS_PAGE` and `LEGACY_REGIONS_PAGE` on). Set both off to send `/regions` to a gallery tab instead. | @@ -27,10 +27,17 @@ also unchanged. **Language.** The gallery follows the site's language and the language switcher (all 11 locales; Arabic lays out right-to-left). -**Map engine.** If `NUXT_PUBLIC_MAPBOX_TOKEN` is set, every map uses Mapbox with that token, as -before. If it is not set (for example, a fresh laptop with no `.env`), every map (the Research -gallery and the home, pray and adopt maps) uses the keyless MapLibre engine (OpenFreeMap tiles) -instead of refusing to start. So the whole site's maps work with no secrets at all. +**Map engine.** Every map on the site (the Deep Research gallery and the home, pray, adopt, research +and country maps) uses the keyless MapLibre engine by default, so the whole site's maps work with no +secrets at all. To switch back to Mapbox, as doxa.life uses it today, set +`NUXT_PUBLIC_MAP_PROVIDER=mapbox` together with `NUXT_PUBLIC_MAPBOX_TOKEN`; a token alone does not +switch, and "mapbox" without a token falls back to MapLibre. The page loads only the map bundle; each +map loads its own engine, so nothing is fetched from api.mapbox.com unless Mapbox is chosen. + +**What comes from elsewhere.** The map code and the data folder are this site's own (`/dx-maps/`). The +MapLibre engine comes from jsDelivr, the base-map tiles from OpenFreeMap and VersaTiles, one +dashboard's country figures from the World Bank API, and the maps' people-group data from the prayer +API (`NUXT_PUBLIC_PRAY_BASE_URL`, default `https://pray.doxa.life`). **One scrollbar.** The gallery is a full-page app: it fills exactly the space between the header and the bottom of the screen. The Deep Research page has no footer and does not scroll itself, so the diff --git a/MOBILIZATION-MAPS-LAPTOP.md b/MOBILIZATION-MAPS-LAPTOP.md index e126f033..e3de4abb 100644 --- a/MOBILIZATION-MAPS-LAPTOP.md +++ b/MOBILIZATION-MAPS-LAPTOP.md @@ -36,24 +36,30 @@ prayer API (`https://pray.doxa.life`, the default). | Home, Pray, Adopt (DX Life's own maps, unchanged) | , [/pray](http://localhost:4611/pray), [/adopt](http://localhost:4611/adopt) | | Plugin Studio (it is in the maps folder; no page needed) | | -## Try Mapbox (optional) +## Map engine: MapLibre by default, Mapbox by one setting -Every map uses MapLibre unless the site chooses Mapbox. Choosing it is one setting plus the token. -Stop the server, then: +**Every map on the site uses MapLibre by default**, including DX Life's own maps on the home, pray, +adopt and country pages. MapLibre needs no key, so the site, and any partner site, works with no +token. + +**To switch back to Mapbox**, as doxa.life uses it today, set one setting plus the token, then start +the server: ```bash NUXT_PUBLIC_MAP_PROVIDER=mapbox NUXT_PUBLIC_MAPBOX_TOKEN=pk.your-token PORT=4611 bun run dev ``` -Without a token, "mapbox" falls back to MapLibre, so a map always starts. +On a deployed site, set the same two variables in its environment. Without a token, "mapbox" falls +back to MapLibre, so a map always starts. ## What is in this branch -- `/deep-research`: the Research Gallery (the DX Maps mobilization maps in one app), filling the page - below the header. Its Experimental folder is hidden. -- `/research`: the page file is identical to production's (github `master` fc4d622); the research map +- `/deep-research`: the Deep Research gallery (the DX Maps mobilization maps in one app), filling the + page below the header. Its Experimental folder is hidden, and every tab has an info button that + explains what the map does. +- `/research`: the page file is identical to DX Life's production branch (fc4d622); the research map now loads from this site's own `/dx-maps/`. -- `public/dx-maps/`: the DX Maps output folder, from DX Maps `development` f0eb33951. +- `public/dx-maps/`: the DX Maps output folder, from DX Maps `development` cff06fb8e. - The page never loads anything from api.mapbox.com; a map loads Mapbox itself, and only when Mapbox is chosen. A slow or blocked Mapbox cannot stop a map from appearing. diff --git a/app/pages/deep-research/index.vue b/app/pages/deep-research/index.vue index 7c6239e5..2c95a053 100644 --- a/app/pages/deep-research/index.vue +++ b/app/pages/deep-research/index.vue @@ -5,7 +5,8 @@ // and robots are told not to index it. It is reached by its address only. // // The gallery is a web component served from DX-life's OWN origin (public/dx-maps/, a copy of -// the dx-maps build tree), so this site is its CDN: one script, one element, no third-party host. +// the dx-maps build tree), so this site is its CDN: one script, one element, and no other host for the +// map code (the engine and base-map tiles come from public services; see DX-MAPS-GALLERY.md). // It reads its manifest and every child map from the same /dx-maps/ tree. See // DX-MAPS-GALLERY.md at the repo root. //