@wikimedia/makizushi
v4.1.0
Published
Glue to render Maki icons embedded in a map marker pin
Downloads
77
Readme
makizushi
Professional Maki chef. This module produces custom markers based on the Maki icon set, in custom sizes and colors. To do this, it chooses, tints, and flattens parts of the image, using node-blend.
install
npm install --save @kartotherian/makizushi
updating icons
To use a newer version of Maki and extract the icons, you must have Inkscape installed locally. Then, update the package and extract:
npm install --also=dev
npm update
./render.sh
api
makizushi(options, callback)
Options:
tint
: a color in rgb or rrggbbsymbol
: a Maki symbol name, or a number from 0 to 99size
: one ofs
,m
, orl
base
:"pin"
retina
:true
orfalse
,true
will return a 2x resolution image
Callback: (err, data)
in which err is an error if any, and data is a
buffer of image data.
usage
var makizushi = require('makizushi');
makizushi({
base: 'pin',
size: 'l',
tint: '333',
symbol: 'car',
retina: true
}, function(err, buf) {
if (err) throw err;
fs.writeFileSync('marker.png', buf);
});