@mapbox/style-templates

0.9.0 • Public • Published

Style templates

A list of template and designer styles to share for accuracy across projects.

Build Status

Usage

import { getTemplates } from '@mapbox/style-templates';
const templates = getTemplates('production');

console.log(templates);

Contributing

Add any new entry to templates.json. Styles are grouped in template or designer arrays and each entry should be formatted in the following way:

{
    /* Required fields */

    "title": "Title of the style",
    "description": "Description of the style. Keep it pithy",
    "id": {
        "production": "A valid style url (i.e mapbox://styles/mapbox/streets-v9)",
        "staging": "A valid style url from staging"
    },
    "center": {
      "lng": -122.4241,
      "lat": 37.78,
      "zoom": 9
    },


    /* Required fields for designer styles */

    "author": "Name of author",
    "color": "as valid hex (i.e #333)"
}

Verify how your style will look from the static API by running the test site:

npm install && npm start

Open http://localhost:9966/ and thumbnails for each entry should be generated from the staging environment. To verify styles render correctly in production, replace npm start with:

npm run start-production

Releasing

$ npm version {major|minor|patch}
$ git push --follow-tags
$ mbx npm publish

Readme

Keywords

none

Package Sidebar

Install

npm i @mapbox/style-templates

Weekly Downloads

0

Version

0.9.0

License

Copyright © Mapbox

Unpacked Size

19.7 kB

Total Files

11

Last publish

Collaborators

  • mbx-npm-ci-production
  • mbx-npm-ci-staging
  • mbx-npm-advanced-actions-production
  • mbx-npm-advanced-actions-staging
  • mbx-npm-09-production
  • mbx-npm-08-production
  • mbx-npm-07-production
  • mbx-npm-06-production
  • mbx-npm-05-production
  • mbx-npm-04-production
  • mbx-npm-03-production
  • mbx-npm-02-production
  • mbx-npm-01-production
  • mbx-npm-02-staging
  • mapbox-npm-01
  • mapbox-npm-02
  • mapbox-npm-07
  • mapbox-npm-03
  • mapbox-npm-04
  • mapbox-npm-09
  • mapbox-npm-05
  • mapbox-npm-06
  • mapbox-npm-08
  • mapbox-npm-advanced-actions
  • mapbox-npm-ci
  • mapbox-npm
  • mapbox-admin
  • mapbox-machine-user