From d51b5b7b2a09fd57d82109664ccee45c047898c8 Mon Sep 17 00:00:00 2001 From: Christian Gick Date: Thu, 9 Apr 2026 07:36:27 +0300 Subject: [PATCH] remove circle markers from map entirely Co-Authored-By: Claude Opus 4.6 (1M context) --- static/map-embed.html | 49 ------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/static/map-embed.html b/static/map-embed.html index 63d2d67..7abe630 100644 --- a/static/map-embed.html +++ b/static/map-embed.html @@ -183,35 +183,6 @@ body { margin: 0; overflow: hidden; } renderChoropleth(); _ifkMap.on('moveend', function() { if (needsRerender()) renderChoropleth(); }); - // Circle markers for small countries that are hard to see on the choropleth - var SMALL_COUNTRY_COORDS = { - '196': [33.4, 35.1], // Cyprus - '470': [14.4, 35.9], // Malta - '702': [103.8, 1.35] // Singapore - }; - var smallFeatures = []; - countries.forEach(function(c) { - var coords = SMALL_COUNTRY_COORDS[c.isoNum]; - if (coords) { - smallFeatures.push({ - type: 'Feature', - geometry: { type: 'Point', coordinates: coords }, - properties: { isoNum: c.isoNum, color: STATUS_COLORS[c.status], name: (c[LANG] || c.en).name } - }); - } - }); - if (smallFeatures.length) { - _ifkMap.addSource('small-countries', { type: 'geojson', data: { type: 'FeatureCollection', features: smallFeatures } }); - _ifkMap.addLayer({ - id: 'small-countries-circle', type: 'circle', source: 'small-countries', - paint: { - 'circle-radius': 8, 'circle-color': ['get', 'color'], - 'circle-stroke-width': 2, 'circle-stroke-color': '#ffffff', - 'circle-opacity': 0.9 - } - }); - } - // Invisible GeoJSON layer for hover/click interaction _ifkMap.addSource('countries', { type: 'geojson', data: geo }); _ifkMap.addLayer({ @@ -258,26 +229,6 @@ body { margin: 0; overflow: hidden; } } popup.setLngLat(e.lngLat).setHTML(html).addTo(_ifkMap); }); - // Click handler for small country circles - if (smallFeatures.length) { - _ifkMap.on('mouseenter', 'small-countries-circle', function() { _ifkMap.getCanvas().style.cursor = 'pointer'; }); - _ifkMap.on('mouseleave', 'small-countries-circle', function() { _ifkMap.getCanvas().style.cursor = ''; }); - _ifkMap.on('click', 'small-countries-circle', function(e) { - var id = e.features[0].properties.isoNum; - var c = byIsoNum[id]; - if (!c) return; - var loc = c[LANG] || c.en; - var labels = STATUS_LABELS[LANG] || STATUS_LABELS.en; - var ageLabel = AGE_LABELS[LANG] || AGE_LABELS.en; - var html = '' + c.flag + ' ' + loc.name + '
' + - '' + loc.law + '
' + - '' + labels[c.status] + ' (' + c.year + ')' + - '
👤 ' + ageLabel + ': ' + c.ageLimitSocial + '+
' + - '
' + loc.detail + '
'; - popup.setLngLat(e.lngLat).setHTML(html).addTo(_ifkMap); - }); - } - }).catch(function(e) { console.error('Choropleth load error:', e); }); }); })();