Fluent builder class for constructing SVG URLs with method chaining
const url = new SvgUrlBuilder('marker') .size(44, 44) .pixelRatio(2) .colors({ fg: '#d35400', bg: '#ffffff' }) .text('EWR', { fontSize: 18, textColor: '#d35400' }) .build(); Copy
const url = new SvgUrlBuilder('marker') .size(44, 44) .pixelRatio(2) .colors({ fg: '#d35400', bg: '#ffffff' }) .text('EWR', { fontSize: 18, textColor: '#d35400' }) .build();
Set width and height
Optional
Set pixel ratio for HiDPI displays
Set foreground and background colors
Apply color tint
Add text overlay
Add SVG overlay
Add icon grid
Set custom parameter
Build the final URL
Fluent builder class for constructing SVG URLs with method chaining
Example