@mapbox/makiwich

Sandwich together Maki icons with a map marker

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@mapbox/makiwich
Minified + gzip package size for @mapbox/makiwich in KB

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`);
});

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.