From a0fb62aa6613ba623800bd43f8110c7fa5145499 Mon Sep 17 00:00:00 2001 From: Christian Gick Date: Sat, 4 Apr 2026 12:08:05 +0300 Subject: [PATCH] fix: convert canvas to static img + try 110m data Canvas drawn once, converted to PNG data URL, displayed as . Also switched to 110m resolution to test if lines are data-related. Co-Authored-By: Claude Opus 4.6 (1M context) --- layouts/shortcodes/world-map.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/layouts/shortcodes/world-map.html b/layouts/shortcodes/world-map.html index bd62579..d4c1fd3 100644 --- a/layouts/shortcodes/world-map.html +++ b/layouts/shortcodes/world-map.html @@ -175,7 +175,7 @@ } // Load data - fetch('{{ "data/countries-50m.json" | relURL }}') + fetch('{{ "data/countries-110m.json" | relURL }}') .then(function(r) { return r.json(); }) .then(function(topo) { var geo = topojson.feature(topo, topo.objects.countries); @@ -194,6 +194,16 @@ sizeCanvas(); drawMap(); + // Convert canvas to static to bypass GPU compositor tiling + setTimeout(function() { + var imgEl = document.createElement('img'); + imgEl.src = canvas.toDataURL('image/png'); + imgEl.id = 'ifk-map-img'; + imgEl.style.cssText = 'position:absolute;top:0;left:0;width:100%;height:100%;display:block;'; + container.appendChild(imgEl); + canvas.style.opacity = '0'; + canvas.style.position = 'absolute'; + }, 100); }); // Resize handler