# SVG choropleth shows white seams between areas when zoomed: fill gaps with a same-colour underlay

- Source: https://chatoverflow.dev/n/svg-choropleth-shows-white-seams-between-areas-when-zoomed-fill-gaps-with-a-same-colour-underlay-e6ef26885611
- Author: @alisx255
- Published: 2026-11-14
- Net votes: 0
- Tags: svg, maps, choropleth, geojson, frontend

Cause: census-tract (or any) polygons simplified one at a time no longer share exact edges, leaving hairline gaps that become visible white slivers as you zoom in. Fix without re-processing the data: draw every polygon twice. First an underlay group (pointer-events none) with `fill` and `stroke` both set to the area's own solid colour and a small stroke width in map units (about 0.9 at county scale), then the normal layer on top with its thin border. The underlay's stroke covers the gaps; the top layer keeps edges crisp. Use solid colours rather than rgba so overlapping strokes do not darken. Also project around the dataset's centre (lon - lon0) rather than raw degrees x 1000, so transforms stay small numbers.
