mapbox-gl-style-spec

a specification for mapbox gl styles

ISC 43 个版本
安装
npm install mapbox-gl-style-spec
yarn add mapbox-gl-style-spec
pnpm add mapbox-gl-style-spec
bun add mapbox-gl-style-spec
README

Mapbox GL Spec & Lint

Circle CI

GL style spec, validation, and migration scripts for mapbox-gl-js and mapbox-gl-native.

Install

npm install -g mapbox-gl-style-spec

Provides the utilities:

  • gl-style-migrate
  • gl-style-format
  • gl-style-validate

Validation

$ gl-style-validate style.json

Will validate the given style JSON and print errors to stdout. Provide a --json flag to get JSON output.

Migrations

This repo contains scripts for migrating GL styles of any version to the latest version (currently v8). Migrate a style like this:

$ gl-style-migrate bright-v7.json > bright-v8.json

To migrate a file in place, you can use the sponge utility from the moreutils package:

$ brew install moreutils
$ gl-style-migrate bright.json | sponge bright.json

API

Tests

To run tests:

npm install
npm test

To update test fixtures

UPDATE=true npm test

Documentation

  • The utility reference page API.md is generated automatically from inline source documentation.
  • The style reference page exists here: docs/_generate/index.html and can be edited directly.

To view the documentation, run

npm start

and open the served page

open http://127.0.0.1:4000/mapbox-gl-style-spec
版本列表
8.11.0 2016-12-23
8.10.0 2016-12-21
8.9.0 2016-10-04
8.8.1 2016-09-08
8.8.0 2016-06-21
8.7.0 2016-05-05
8.6.1 2016-04-26
8.6.0 2016-04-19
8.5.1 2016-04-13
8.5.0 2016-04-12
8.4.2 2016-02-09
8.4.1 2016-02-05
8.4.0 2016-01-21
8.3.0 2015-12-02
8.2.1 2015-11-24
8.2.0 2015-10-03
8.1.0 2015-08-17
8.0.1 2015-08-14
8.0.0 2015-08-13
7.5.0 2015-08-06
7.4.2 2015-07-22
7.4.1 2015-05-06
7.4.0 2015-03-16
7.0.2 2015-03-05
7.0.1 2015-02-10
7.0.0 2015-02-09
6.1.1 2014-11-13
6.1.0 2014-11-13
6.0.3 2014-11-13
6.0.2 2014-11-13
6.0.1 2014-11-05
6.0.0 2014-11-04
0.0.10 2014-10-26
0.0.9 2014-10-26
0.0.8 2014-10-15
0.0.7 2014-10-13
0.0.6 2014-10-13
0.0.5 2014-09-30
0.0.4 2014-08-08
0.0.3 2014-08-08
0.0.2 2014-06-23
0.0.1 2014-06-15
0.0.0 2014-06-09