Coder Social home page Coder Social logo

mapbox-gl-codeflow-example's Introduction

Mapbox GL Code Flow Example

This repository is a simple example of a development environment for Mapbox GL styles that is based on editing raw code with a text editor. This style of editing is similar to TileMill or the Mapbox Studio desktop tools.

This example is based on Gulp as a framework for its basic utilities:

  • A Mapbox GL JS-powered page for previewing the style
  • Support for JSON, JSON5, YAML, and TOML files as input. You can also specify an executable JavaScript file with a .js extension and hashbang and the file will be run and its output piped into the style definition.
  • Live-reloading when the style is changed

Install

First, clone this git repository:

git clone https://github.com/mapbox/mapbox-gl-codeflow-example.git
cd mapbox-gl-codeflow-example

And then install the dependencies:

npm install

And then start up:

gulp --style=style.json

You can also specify style.json5, style.yml, or style.toml as your inputs. Unlike JSON, these alternative formats support commenting, so you can annotate your styles. Note that this is a one-way conversion, like the conversion from CartoCSS to Mapnik XML was.

Example

This project is an example of one such flow: you could do the same with a bare-bones node.js script, or Python or any other environment. You could also skip some of the fancier features, like live reloading, or add others, like a more complex debugging view.

mapbox-gl-codeflow-example's People

Contributors

tmcw avatar

Watchers

Jordan Meek 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.