Introduction to Mapbox
MapboxGL is based on Leaflet.js. Building on Leaflet, MapboxGL.js integrates with the WebGL library, which leverages HTML5 canvas tags to support Web graphics without plugins. MapboxGL.js supports vector slicing, as well as smooth scaling and panning for 3D environments. It supports GeoJSON overlays as well as markers and shapes. Events (including clicks, zooms and pans) can be used to trigger data processing functions, making it ideal for interactive web mapping applications.
Mapbox Python SDK
The Mapbox Python SDK is used to access most Mapbox services, including directions, geocoding, analytics, and datasets. The underlying access to cloud-based services supports data editing and uploading, system management, and location-based queries, allowing organizations to integrate and extend them with native GIS. Although the MapboxGL-Jupter tool does not rely on this SDK, it is very useful for data uploads and queries.
Use of Mapbox
Official sample code.
Execution result: The coordinate points are not shown on the map. The following figure.
The reason for this is that the ‘points.geojson’ file read by CircleViz is not read by a relative path, but by a spliced URL, i.e. the request URL is:
127.0.0.1:8888/points.geojson, so it will result in the following error.
Solution: Store the points.geojson file in memory instead of directly as a file:
More usage examples.
- Categorical points
- All visualization types
- Choropleth Visualization types
- Image Visualization types
- Raster Tile Visualization types
Personal summary: the overall functionality does not lose folium, including heat maps, Choropleth maps, etc. are supported, and also supports custom tiles. Mainly Sean Gillies, the head of Mapbox open source, is the main developer of Shapely, Fiona and Rasterio. Vladimir Agafonkin, developer of Leaflet, has been working for Mapbox since 2013.