Giter Site home page Giter Site logo

klokantech / mapbox-gl-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mapbox/mapbox-gl-js

2.0 3.0 0.0 15.31 MB

Render Mapbox styles in the browser using JavaScript and WebGL

Home Page: https://www.mapbox.com/mapbox-gl-js/

License: Other

JavaScript 94.30% HTML 1.89% Shell 0.15% CSS 0.97% GLSL 2.68%

mapbox-gl-js's Introduction

Build Status

A WebGL JavaScript interactive maps library that can render Mapbox Vector Tiles.

Using mapbox-gl-js

Include the source via HTML tags:

<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.14.3/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.14.3/mapbox-gl.css' rel='stylesheet' />

For more information, see the API documentation and examples.

Alternatively, you can npm install mapbox-gl and use it as a bundled dependency with browserify.

Developing mapbox-gl-js

The following tools are required on any platform to develop mapbox-gl-js. Mac users are advised to use Homebrew unless they want to build these packages manually. APT install steps are relevant to Ubuntu Linux users.

  • git
    • OSX: brew install git
    • APT: sudo apt-get install git
  • node.js
  • GNU Make
  • imagemagick
    • OSX: brew install imagemagick
    • APT: sudo apt-get install imagemagick

On Linux, libglew-dev is required in order to run rendering tests:

$ sudo apt-get install libglew-dev

To install dependencies and build the source files:

$ npm install

To serve the debug page:

$ npm start &
$ open "http://localhost:9966/debug/?access_token="`echo $MapboxAccessToken`

This assumes you have the MapboxAccessToken environment variable set to a Mapbox API token from https://www.mapbox.com/account/apps/. This command uses mattdesl/budo to watch source files, rebuild the browserify bundle, and trigger LiveReload updates.

Running Tests

There are two test suites associated with Mapbox GL JS

  • npm test runs quick unit tests
  • npm run test-suite runs slower rendering tests from the mapbox-gl-test-suite repository

Running Benchmarks

The FPS benchmarking page compares the performance of your local copy of GL JS against previously released versions. Benchmarking configuration is within bench/fps/site.js.

To serve the FPS benchmark page:

$ npm start &
$ open "http://localhost:9966/bench/fps/?access_token="`echo $MapboxAccessToken`

Writing Documentation

See docs/README.md.

Recommended Reading

Learning WebGL

GL performance

Misc

mapbox-gl-js's People

Contributors

ansis avatar mourner avatar jfirebaugh avatar kkaefer avatar tmcw avatar yhahn avatar tristen avatar dmitrig01 avatar mikemorris avatar bhousel avatar tatsvc avatar scothis avatar edenh avatar incanus avatar katydecorah avatar kapadia avatar anandthakker avatar 1ec5 avatar samanpwbb avatar kelvinabrokwa avatar vicapow avatar mcwhittemore avatar danswick avatar lyzidiamond avatar willwhite avatar michaelsteffen avatar geografa avatar who8mycakes avatar lbud avatar fnicollet avatar

Stargazers

 avatar Rafał Pięciorak avatar

Watchers

Petr Pridal avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.