Gathering detailed insights and metrics for @maplibre/maplibre-gl-style-spec
Gathering detailed insights and metrics for @maplibre/maplibre-gl-style-spec
Gathering detailed insights and metrics for @maplibre/maplibre-gl-style-spec
Gathering detailed insights and metrics for @maplibre/maplibre-gl-style-spec
MapLibre Style Specification & Utilities
npm install @maplibre/maplibre-gl-style-spec
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
93 Stars
680 Commits
65 Forks
11 Watching
4 Branches
39 Contributors
Updated on 28 Nov 2024
TypeScript (98.72%)
JavaScript (1.28%)
Cumulative downloads
Total Downloads
Last day
-8.3%
88,962
Compared to previous day
Last week
0.2%
491,275
Compared to previous week
Last month
12.4%
2,070,340
Compared to previous month
Last year
726.6%
15,219,037
Compared to previous year
7
30
This repository contains code and reference files that define the MapLibre style specification and provides some utilities for working with MapLibre styles.
The style specification is used in MapLibre GL JS and in MapLibre Native. Our long-term goal is to have feature parity between the web and the native libraries.
If you want to contribute to the style specification, please open an issue with a design proposal. Once your design proposal has been accepted, you can open a pull request and implement your changes.
We aim to avoid breaking changes in the MapLibre style specification, because it makes life easier for our users.
The documentation of the style specification also lives in this repository. We use MkDocs with the Material for MkDocs theme.
To work on the documentation locally, you need to have Docker installed and running. Start MkDocs with
npm run mkdocs
Most of the documentation is generated (from e.g. v8.json
). In another terminal, run:
WATCH=1 npm run generate-docs
This will re-run the generation script when needed.
Note that generated files should not be checked in and they are excluded in .gitignore
. Make sure to keep this file up-to-date and ignore generated files while making sure static Markdown files are not ignored.
The MapLibre style specification and utilities are published as a separate npm package so that they can be installed without the bulk of GL JS.
npm install @maplibre/maplibre-gl-style-spec
If you install this package globally, you will have access to several CLI tools.
npm install @maplibre/maplibre-gl-style-spec --global
gl-style-migrate
This repo contains scripts for migrating GL styles of any version to the latest version (currently v8). Migrate a style like this:
1$ 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:
1$ brew install moreutils 2$ gl-style-migrate bright.json | sponge bright.json
gl-style-format
1$ gl-style-format style.json
Will format the given style JSON to use standard indentation and sorted object keys.
gl-style-validate
1$ gl-style-validate style.json
Will validate the given style JSON and print errors to stdout. Provide a
--json
flag to get JSON output.
No vulnerabilities found.
No security vulnerabilities found.