@mapbox/simplespec-to-gl-style

Converts GeoJSON styled with simplestyle-spec to a GL Style

Stats

StarsIssuesVersionUpdatedCreatedSize
@mapbox/simplespec-to-gl-style
0.4.02 years ago5 years agoMinified + gzip package size for @mapbox/simplespec-to-gl-style in KB

Readme

simplespec-to-gl-style

Converts GeoJSON styled with simplestyle-spec to a GL Style

Install

npm install @mapbox/simplespec-to-gl-style --save

Usage:

var convert = require('@mapbox/simplespec-to-gl-style');

var style = convert(myGeoJSON);

var map = new mapboxgl.Map({
    container: 'map',
    style: style, // add style to a map
    center: [-74.50, 40],
    zoom: 9
});

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.