@mapbox/makiwich
v0.0.13
Published
Sandwich together Maki icons with a map marker
Downloads
144
Maintainers
Keywords
Readme
Makiwich
Composites Maki icons with a map marker and returns an SVG.
Install
npm install @mapbox/makiwich --save
Usage
var makiwich = require('@mapbox/makiwich');
var mapnik = require('mapnik');
makiwich.generateMarker({
tint: '#454545',
symbol: 'zoo', // Valid Maki v2.1.0 icon
size: 'l' // `s` or `l`
}, (err, svg) => {
if (err) throw err;
// Use mapnik to convert the SVG to a PNG and save it
var s = new mapnik.Image.fromSVGBytesSync(new Buffer(svg), { scale: 2 });
s.premultiplySync();
s.saveSync(`zoo.png`);
});