Skip to content

jmpunkt/map-sprite-packer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Map Sprite Packer

Bundles SVG icons into a single PNG sprite and a lookup table (as JSON) for Maplibre/Mapbox. Mainly used with Nix for reproducible map styles.

Example

Building the sprites of osm-liberty.

git clone https://github.com/maputnik/osm-liberty
cd osm-liberty
nix run github:jmpunkt/map-sprite-packer -- --svgs svgs/svgs_iconset --svgs svgs/svgs_not_in_iconset --width 600 --height 500 --output out

The directory out contains the PNG and JSON files. Notice that there are two versions, one with scale 1.0 and one with scale 2.0.

Afterwards you might want to optimize the PNG.

About

SVG icon packer for maps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published