You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lion 7b9aeb1016
地图 扣分选择
3 years ago
..
bin 地图 点位签到 3 years ago
build 地图 点位签到 3 years ago
dist 地图 点位签到 3 years ago
error 地图 点位签到 3 years ago
expression 地图 点位签到 3 years ago
feature_filter 地图 点位签到 3 years ago
flow-typed 地图 点位签到 3 years ago
function 地图 点位签到 3 years ago
migrate 地图 点位签到 3 years ago
reference 地图 点位签到 3 years ago
util 地图 点位签到 3 years ago
validate 地图 点位签到 3 years ago
.eslintrc 地图 点位签到 3 years ago
CHANGELOG.md 地图 点位签到 3 years ago
README.md 地图 点位签到 3 years ago
composite.js 地图 点位签到 3 years ago
deref.js 地图 点位签到 3 years ago
diff.js 地图 点位签到 3 years ago
empty.js 地图 点位签到 3 years ago
format.js 地图 点位签到 3 years ago
group_by_layout.js 地图 点位签到 3 years ago
migrate.js 地图 点位签到 3 years ago
package.json 地图 扣分选择 3 years ago
read_style.js 地图 点位签到 3 years ago
rollup.config.js 地图 点位签到 3 years ago
style-spec.js 地图 点位签到 3 years ago
test.js 地图 点位签到 3 years ago
types.js 地图 点位签到 3 years ago
validate_mapbox_api_supported.js 地图 点位签到 3 years ago
validate_style.js 地图 点位签到 3 years ago
validate_style.min.js 地图 点位签到 3 years ago
visit.js 地图 点位签到 3 years ago

README.md

Mapbox GL style specification & utilities

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

npm package

The Mapbox 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 @mapbox/mapbox-gl-style-spec

CLI Tools

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

npm install @mapbox/mapbox-gl-style-spec --global

gl-style-composite

$ gl-style-composite style.json

Will take a non-composited style and produce a composite style.

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.

To validate that a style can be uploaded to the Mapbox Styles API, use the --mapbox-api-supported flag.