Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 716 Bytes

API-JavaScript.md

File metadata and controls

28 lines (20 loc) · 716 Bytes

Table of Contents

styleToFilters

Takes optimized filter object from shaver.styleToFilters and returns c++ filters for shave.

Parameters

  • style Object Mapbox GL Style JSON

Examples

var shaver = require('@mapbox/vtshaver');
var style = require('/path/to/style.json');
var filters = shaver.styleToFilters(style);
console.log(filters);
// {
//   "poi_label": ["!=","maki","cafe"],
//   "road": ["==","class","path"],
//   "water": true,
//   ...
// }