mapbox / mapbox/mapboxgl-jupyter
Generate entire Mapbox Style sheet in Python thread
@ryanbaumann is already working on this.
Since Dec 3, 2017.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.