fix: higher-res boundaries (50m), hide city names, country-only labels
Some checks failed
Deploy Internet for Kids / Build & Push (push) Successful in 10s
Deploy Internet for Kids / Deploy (push) Successful in 6s
Deploy Internet for Kids / Health Check (push) Successful in 1s
Deploy Internet for Kids / IndexNow Ping (push) Has been cancelled
Deploy Internet for Kids / Promote to Latest (push) Has been cancelled
Deploy Internet for Kids / Rollback (push) Has been cancelled
Deploy Internet for Kids / Audit (push) Has been cancelled
Deploy Internet for Kids / Smoke Tests (push) Has been cancelled

- 50m GeoJSON for cleaner country outlines (was 110m)
- Hide all symbol layers except country/continent names
- Country names only visible at zoom >= 3

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-04-03 16:00:02 +03:00
parent 3d8e568f8c
commit 57320ccb51
2 changed files with 9 additions and 5 deletions

View File

@@ -79,7 +79,7 @@ function ifkInitMap() {
}
});
fetch('{{ "data/countries-110m.json" | relURL }}')
fetch('{{ "data/countries-50m.json" | relURL }}')
.then(function(r) { return r.json(); })
.then(function(topo) {
var geo = topojson.feature(topo, topo.objects.countries);
@@ -124,11 +124,14 @@ function ifkInitMap() {
}
}, firstLabel);
// Hide country labels below zoom 3
// Hide all labels except country names at zoom >= 3
layers.forEach(function(l) {
if (l.type === 'symbol' && (l.id.indexOf('country') >= 0 || l.id.indexOf('place') >= 0 || l.id.indexOf('continent') >= 0)) {
window._ifkMap.setLayoutProperty(l.id, 'visibility', 'visible');
window._ifkMap.setLayerZoomRange(l.id, 3, 24);
if (l.type === 'symbol') {
if (l.id.indexOf('country') >= 0 || l.id.indexOf('continent') >= 0) {
window._ifkMap.setLayerZoomRange(l.id, 3, 24);
} else {
window._ifkMap.setLayoutProperty(l.id, 'visibility', 'none');
}
}
});