Gospel resources: MapLibre was dropping every pin on the map
check:maplibre-drops went red on gospel-resources/resources-map and the new gospel-dashboard leaf: layers.gr-pins.paint.circle-sort-key: unknown property. circle-sort-key is a LAYOUT property. Mapbox tolerates it in `paint`; MapLibre rejects the whole layer for one misplaced property and does NOT throw — so under the keyless engine all 12,379 dots were absent while the page still rendered its basemap, its choropleth and its legend, and looked fine. That is the same defect that cost all-people-groups its pins, so the fix is the same: move the key into `layout` and leave the z-order comment with it, since the reason (a group with nothing found must win the z-fight) is about the sort, not about paint. MEASURED after, both engines: gr-pins present, circle-sort-key in layout, pins drawn. Screenshot read on maplibre — dots and choropleth both there. check:maplibre-drops PASS 17/17 (it was 15 ok / 2 dropping). The gate earned its keep here: this arrived with incoming work, not with mine, and nothing in the page's own appearance would have told anyone.
This commit is contained in:
parent
26501b78df
commit
9bc2b5ea48
9 changed files with 24 additions and 17 deletions
|
|
@ -646,6 +646,17 @@ function paintPins(map) {
|
|||
map.addSource('gr-pin-src', { type: 'geojson', data: pinFC() })
|
||||
map.addLayer({
|
||||
id: 'gr-pins', type: 'circle', source: 'gr-pin-src',
|
||||
// circle-sort-key is a LAYOUT property. Mapbox tolerates it in `paint`; MapLibre
|
||||
// rejects the whole layer for one misplaced property — without throwing — so every
|
||||
// pin on this map vanished under the keyless engine while the page still looked
|
||||
// fine. Same defect, same fix, as all-people-groups. check:maplibre-drops is the
|
||||
// gate that names it.
|
||||
layout: {
|
||||
// A group with NOTHING found draws ON TOP of a covered one. At world zoom the
|
||||
// pins overlap heavily, and the whole purpose of this map is that the gap is
|
||||
// the thing you cannot miss — so the gap wins the z-fight, by construction.
|
||||
'circle-sort-key': ['match', ['get', 'tier'], 0, 3, 1, 2, 1],
|
||||
},
|
||||
paint: {
|
||||
'circle-color': ['get', 'color'],
|
||||
'circle-stroke-color': '#ffffff',
|
||||
|
|
@ -653,10 +664,6 @@ function paintPins(map) {
|
|||
'circle-stroke-opacity': 0.85,
|
||||
'circle-radius': ['interpolate', ['linear'], ['zoom'], 0, 1.8, 4, 3, 8, 5.5, 12, 8],
|
||||
'circle-opacity': 0.92,
|
||||
// A group with NOTHING found draws ON TOP of a covered one. At world zoom the
|
||||
// pins overlap heavily, and the whole purpose of this map is that the gap is
|
||||
// the thing you cannot miss — so the gap wins the z-fight, by construction.
|
||||
'circle-sort-key': ['match', ['get', 'tier'], 0, 3, 1, 2, 1],
|
||||
},
|
||||
})
|
||||
// TAP, not hover — same reason as the choropleth: hover never fires on a phone.
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-3KTr1qhgnkpG3VcebvpMExKEBfsMuHLimRhzbv8FBWxHoV+nyVe9vUqI6pcV4gZl" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-TiRZbat0Kaxnl3yc5jZGVBaEkfQau4jxgRhdne31vkEYSldmSpOKiNX4WjwRudUQ" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-3KTr1qhgnkpG3VcebvpMExKEBfsMuHLimRhzbv8FBWxHoV+nyVe9vUqI6pcV4gZl" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-TiRZbat0Kaxnl3yc5jZGVBaEkfQau4jxgRhdne31vkEYSldmSpOKiNX4WjwRudUQ" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-3KTr1qhgnkpG3VcebvpMExKEBfsMuHLimRhzbv8FBWxHoV+nyVe9vUqI6pcV4gZl" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-TiRZbat0Kaxnl3yc5jZGVBaEkfQau4jxgRhdne31vkEYSldmSpOKiNX4WjwRudUQ" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-3KTr1qhgnkpG3VcebvpMExKEBfsMuHLimRhzbv8FBWxHoV+nyVe9vUqI6pcV4gZl" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-TiRZbat0Kaxnl3yc5jZGVBaEkfQau4jxgRhdne31vkEYSldmSpOKiNX4WjwRudUQ" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-3KTr1qhgnkpG3VcebvpMExKEBfsMuHLimRhzbv8FBWxHoV+nyVe9vUqI6pcV4gZl" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-TiRZbat0Kaxnl3yc5jZGVBaEkfQau4jxgRhdne31vkEYSldmSpOKiNX4WjwRudUQ" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
2
public/doxa-maps/index.html
generated
2
public/doxa-maps/index.html
generated
File diff suppressed because one or more lines are too long
12
public/doxa-maps/manifest.json
generated
12
public/doxa-maps/manifest.json
generated
|
|
@ -591,7 +591,7 @@
|
|||
"bundle": "gospel-resources",
|
||||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"output": "doxa-maps/gospel-resources/gospel-resources.js",
|
||||
"integrity": "sha384-3KTr1qhgnkpG3VcebvpMExKEBfsMuHLimRhzbv8FBWxHoV+nyVe9vUqI6pcV4gZl",
|
||||
"integrity": "sha384-TiRZbat0Kaxnl3yc5jZGVBaEkfQau4jxgRhdne31vkEYSldmSpOKiNX4WjwRudUQ",
|
||||
"elements": [
|
||||
"gospel-resources-map"
|
||||
],
|
||||
|
|
@ -611,7 +611,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/charts/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-3KTr1qhgnkpG3VcebvpMExKEBfsMuHLimRhzbv8FBWxHoV+nyVe9vUqI6pcV4gZl\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"charts\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-TiRZbat0Kaxnl3yc5jZGVBaEkfQau4jxgRhdne31vkEYSldmSpOKiNX4WjwRudUQ\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"charts\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -625,7 +625,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/data-tables/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-3KTr1qhgnkpG3VcebvpMExKEBfsMuHLimRhzbv8FBWxHoV+nyVe9vUqI6pcV4gZl\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"data-tables\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-TiRZbat0Kaxnl3yc5jZGVBaEkfQau4jxgRhdne31vkEYSldmSpOKiNX4WjwRudUQ\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"data-tables\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -639,7 +639,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/gospel-dashboard/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-3KTr1qhgnkpG3VcebvpMExKEBfsMuHLimRhzbv8FBWxHoV+nyVe9vUqI6pcV4gZl\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"gospel-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-TiRZbat0Kaxnl3yc5jZGVBaEkfQau4jxgRhdne31vkEYSldmSpOKiNX4WjwRudUQ\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"gospel-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -653,7 +653,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/resources-list/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-3KTr1qhgnkpG3VcebvpMExKEBfsMuHLimRhzbv8FBWxHoV+nyVe9vUqI6pcV4gZl\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"resources-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-TiRZbat0Kaxnl3yc5jZGVBaEkfQau4jxgRhdne31vkEYSldmSpOKiNX4WjwRudUQ\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"resources-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -667,7 +667,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/resources-map/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-3KTr1qhgnkpG3VcebvpMExKEBfsMuHLimRhzbv8FBWxHoV+nyVe9vUqI6pcV4gZl\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"resources-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-TiRZbat0Kaxnl3yc5jZGVBaEkfQau4jxgRhdne31vkEYSldmSpOKiNX4WjwRudUQ\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"resources-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue