Create a new SpriteBuilder
Configuration options
OptionalpixelRatio?: numberPixel ratio for rendering (default: 1)
Set pixel ratio (must be positive number)
Add an SVG icon to the sprite
Add multiple SVG icons at once (array or record)
Add an SVG icon only if not already present
Export sprite sheet as object URL
Export JSON metadata as object URL
Export both sprite and JSON URLs
Export URLs along with layout size
Export JSON metadata object
Export canvas element
Export sprite assets (JSON + PNG bytes)
Clean up resources and revoke URLs
Revoke a specific object URL
Optionalurl: null | stringStaticregisterRegister a MapLibre custom protocol to serve sprites from memory
MapLibre GL JS instance
Protocol name
Sprite assets registry
Protocol options
Function to unregister protocol
Builder class for creating and managing sprite sheets from SVG icons
Example