fix: nuke ALL base layers then re-enable only water fills
All checks were successful
Deploy Internet for Kids / Build & Push (push) Successful in 10s
Deploy Internet for Kids / Deploy (push) Successful in 5s
Deploy Internet for Kids / Health Check (push) Successful in 2s
Deploy Internet for Kids / Smoke Tests (push) Successful in 3s
Deploy Internet for Kids / IndexNow Ping (push) Successful in 6s
Deploy Internet for Kids / Promote to Latest (push) Successful in 1s
Deploy Internet for Kids / Rollback (push) Has been skipped
Deploy Internet for Kids / Audit (push) Successful in 2s
All checks were successful
Deploy Internet for Kids / Build & Push (push) Successful in 10s
Deploy Internet for Kids / Deploy (push) Successful in 5s
Deploy Internet for Kids / Health Check (push) Successful in 2s
Deploy Internet for Kids / Smoke Tests (push) Successful in 3s
Deploy Internet for Kids / IndexNow Ping (push) Successful in 6s
Deploy Internet for Kids / Promote to Latest (push) Successful in 1s
Deploy Internet for Kids / Rollback (push) Has been skipped
Deploy Internet for Kids / Audit (push) Successful in 2s
Hide every single layer first, then only show water with matching outline color. No lines of any kind remain. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -65,24 +65,24 @@ function ifkInitMap() {
|
||||
window._ifkMap.addControl(new maplibregl.NavigationControl({ showCompass: false }), 'top-right');
|
||||
|
||||
window._ifkMap.on('load', function() {
|
||||
// Strip base map to minimal: white land, light gray water, thin borders only
|
||||
// Nuke ALL base map layers, then selectively re-enable only what we need
|
||||
var style = window._ifkMap.getStyle();
|
||||
style.layers.forEach(function(l) {
|
||||
if (l.id === 'background') {
|
||||
window._ifkMap.setPaintProperty(l.id, 'background-color', '#eaeaea');
|
||||
return;
|
||||
} else {
|
||||
window._ifkMap.setLayoutProperty(l.id, 'visibility', 'none');
|
||||
}
|
||||
});
|
||||
// Re-enable only water fills (no outlines)
|
||||
style.layers.forEach(function(l) {
|
||||
if (l.type === 'fill' && l.id.indexOf('water') >= 0) {
|
||||
window._ifkMap.setPaintProperty(l.id, 'fill-color', '#eef2f7');
|
||||
return;
|
||||
window._ifkMap.setLayoutProperty(l.id, 'visibility', 'visible');
|
||||
window._ifkMap.setPaintProperty(l.id, 'fill-color', '#dfe6ee');
|
||||
if (l.paint && l.paint['fill-outline-color'] !== undefined) {
|
||||
window._ifkMap.setPaintProperty(l.id, 'fill-outline-color', '#dfe6ee');
|
||||
}
|
||||
}
|
||||
if (l.type === 'line' && l.id.indexOf('admin') >= 0) {
|
||||
window._ifkMap.setPaintProperty(l.id, 'line-color', '#d1d5db');
|
||||
window._ifkMap.setPaintProperty(l.id, 'line-width', 0.5);
|
||||
return;
|
||||
}
|
||||
// Hide everything else
|
||||
window._ifkMap.setLayoutProperty(l.id, 'visibility', 'none');
|
||||
});
|
||||
|
||||
fetch('{{ "data/countries-50m.json" | relURL }}')
|
||||
|
||||
Reference in New Issue
Block a user