Skip to content

Boxed labels in PNG export

Choose a tag to compare

@github-actions github-actions released this 10 Nov 22:31
· 62 commits to main since this release

Reported by the NetDet maps team: labels with a background box were exported as white text without the box.

maptools.js - exportMapImage draws labels and overlay HTML from their computed CSS: background, border, border-radius, padding, multi-line text, opacity and ::before/::after content, each word where the browser laid it out. text-shadow becomes the halo. Cluster bubbles and the location dot are included too.

All map modules - the injected <style> now goes at the start of <head> instead of the end, so page CSS with the same specificity overrides the map's defaults without !important.