Skip to content

Render Mapbox styles in the browser using JavaScript and WebGL

License

Notifications You must be signed in to change notification settings

timiyay/mapbox-gl-js

Repository files navigation

Build Status

A WebGL JavaScript interactive maps library that can render Mapbox vector tiles.

Setup

Install dependencies:

$ npm install

Then build mapbox-gl by running:

$ npm run build           # build dist/mapbox-gl-dev.js
$ npm run production      # build dist/mapbox-gl.js

To rebuild dist/mapbox-gl-dev.js continuously while developing, run:

$ npm run watch

To run the debug page with a map, use any static server, for example:

$ npm install -g serve
$ serve

Open http://localhost:3000/debug/?access_token=<token>, replacing <token> with a Mapbox API token from https://www.mapbox.com/account/apps/.

Tests are written in tape and can run on Sauce Labs via zuul.

  • npm test: local tests run in nodejs - excludes browser tests
  • npm run cov: generate test coverage report - excludes browser tests
  • npm run test-remote: run all tests on Sauce Labs. requires Sauce Labs credentials in your environment.
  • npm run test-browser: run all tests locally in a browser.

master is auto-published to https://mapbox.s3.amazonaws.com/mapbox-gl-js/master/mapbox-gl.js to be used in external projects.

Recommended Reading

Learning WebGL

GL performance

GL text rendering

Misc GL

Includes

About

Render Mapbox styles in the browser using JavaScript and WebGL

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 94.5%
  • GLSL 2.6%
  • HTML 1.7%
  • Other 1.2%