JSPM

@americana/maplibre-gl-style-spec

17.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q26710F
  • License ISC

a specification for maplibre gl styles

Package Exports

  • @americana/maplibre-gl-style-spec
  • @americana/maplibre-gl-style-spec/dist/index.cjs
  • @americana/maplibre-gl-style-spec/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@americana/maplibre-gl-style-spec) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

MapLibre GL style specification & utilities

This directory contains code and reference files that define the MapLibre GL style specification and provides some utilities for working with MapLibre styles.

npm package

The MapLibre GL style specification and utilities are published as a seperate npm package so that they can be installed without the bulk of GL JS.

npm install @americana/maplibre-gl-style-spec

CLI Tools

If you install this package globally, you will have access to several CLI tools.

npm install @americana/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:

$ 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

gl-style-format

$ gl-style-format style.json

Will format the given style JSON to use standard indentation and sorted object keys.

gl-style-validate

$ gl-style-validate style.json

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