You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/python/mapbox-layers.md
+9-11Lines changed: 9 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ jupyter:
6
6
extension: .md
7
7
format_name: markdown
8
8
format_version: '1.3'
9
-
jupytext_version: 1.14.1
9
+
jupytext_version: 1.14.6
10
10
kernelspec:
11
11
display_name: Python 3 (ipykernel)
12
12
language: python
@@ -20,7 +20,7 @@ jupyter:
20
20
name: python
21
21
nbconvert_exporter: python
22
22
pygments_lexer: ipython3
23
-
version: 3.8.0
23
+
version: 3.10.11
24
24
plotly:
25
25
description: How to make Mapbox maps in Python with various base layers, with
26
26
or without needing a Mapbox Access token.
@@ -55,17 +55,21 @@ Mapbox tile maps are composed of various layers, of three different types:
55
55
56
56
#### Mapbox Access Tokens and When You Need Them
57
57
58
-
The word "mapbox" in the trace names and `layout.mapbox` refers to the Mapbox GL JS open-source library, which is integrated into Plotly.py. If your basemap in `layout.mapbox.style` uses data from the Mapbox _service_, then you will need to register for a free account at https://mapbox.com/ and obtain a Mapbox Access token. This token should be provided in `layout.mapbox.access_token` (or, if using Plotly Express, via the `px.set_mapbox_access_token()` configuration function).
58
+
The word "mapbox" in the trace names and `layout.mapbox` refers to the Mapbox GL JS open-source library, which is integrated into Plotly.py.
59
+
60
+
If your basemap in `layout.mapbox.style` uses data from the Mapbox _service_, then you will need to register for a free account at https://mapbox.com/ and obtain a Mapbox Access token. This token should be provided in `layout.mapbox.access_token` (or, if using Plotly Express, via the `px.set_mapbox_access_token()` configuration function).
61
+
62
+
If you basemap in `layout.mapbox.style` uses maps from the [Stadia Maps service](https://www.stadiamaps.com) (see below for details), you'll need to register for a Stadia Maps account and token.
59
63
60
-
> If your `layout.mapbox.style` does not use data from the Mapbox service, you do _not_ need to register for a Mapbox account.
61
64
62
65
#### Base Maps in `layout.mapbox.style`
63
66
64
67
The accepted values for `layout.mapbox.style` are one of:
65
68
66
69
-`"white-bg"` yields an empty white canvas which results in no external HTTP requests
67
-
-`"open-street-map"`, `"carto-positron"`, `"carto-darkmatter"`, `"stamen-terrain"`, `"stamen-toner"` or `"stamen-watercolor"`yield maps composed of _raster_ tiles from various public tile servers which do not require signups or access tokens
70
+
-`"open-street-map"`, `"carto-positron"`, or `"carto-darkmatter"`yield maps composed of _raster_ tiles from various public tile servers which do not require signups or access tokens.
68
71
-`"basic"`, `"streets"`, `"outdoors"`, `"light"`, `"dark"`, `"satellite"`, or `"satellite-streets"` yield maps composed of _vector_ tiles from the Mapbox service, and _do_ require a Mapbox Access Token or an on-premise Mapbox installation.
72
+
-`"stamen-terrain"`, `"stamen-toner"` or `"stamen-watercolor"` yield maps composed of _raster_ tiles from the [Stadia Maps service](https://www.stadiamaps.com), and require a Stadia Maps account and token.
69
73
- A Mapbox service style URL, which requires a Mapbox Access Token or an on-premise Mapbox installation.
70
74
- A Mapbox Style object as defined at https://docs.mapbox.com/mapbox-gl-js/style-spec/
#### Base Tiles from the USGS, radar overlay from Environment Canada: no token needed
132
133
133
134
Here is the same example, with in addition, a WMS layer from Environment Canada which displays near-real-time radar imagery in partly-transparent raster tiles, rendered above the `go.Scattermapbox` trace, as is the default:
0 commit comments