mapbox / mapbox/mapboxgl-jupyter

Generate entire Mapbox Style sheet in Python thread

Open
#23 6 comments 1 reaction 1 assignee View on GitHub

@ryanbaumann is already working on this.

Since Dec 3, 2017.

enhancement high priority
Dominant language
Python
Stars
681
Forks
137
PR merge metrics
No merged PRs in 30d

Description

# Background
Currently, there is business logic occurring in both the Python `mapboxgl` library and the javascript templates. Since this is a Python library, we should isolate all business logic to Python, and make the Javascript/HTML components true templates only. This should greatly increase supportability of the `mapboxgl` library as it grows by isolating bugs to Mapbox GL Style Spec changes, which are much rarer than changes to the Mapbox GL JS Javascript library.

# Approach

1. Generate a complete [Mapbox GL Style Sheet](https://www.mapbox.com/mapbox-gl-js/style-spec/) in a Python dictionary in the [viz.py](https://github.com/mapbox/mapboxgl-jupyter/blob/master/mapboxgl/viz.py)
2. Serve the JSON-format style sheet to the HTML template via a the Jupyter Notebook local web server.
3. Each time the analysis updates, the templates do not need to be destroyed & recreated. The map style simply updates with map.setStyle(newStyleURL)

cc @perrygeo

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.