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
`react-map-gl` is a suite of [React](http://facebook.github.io/react/) components designed to provide a React API for [Mapbox GL JS](https://github.com/mapbox/mapbox-gl-js)-compatible libraries. More information in the online documentation.
14
+
`react-map-gl` is a suite of [React](http://facebook.github.io/react/) components designed to provide a React API for [mapbox-gl](https://github.com/mapbox/mapbox-gl-js) or [maplibre-gl](https://maplibre.org/maplibre-gl-js-docs/api/). More information in the online documentation.
15
15
16
16
See our [Design Philosophy](docs/README.md#design-philosophy).
Copy file name to clipboardExpand all lines: docs/get-started/mapbox-tokens.md
+17-14Lines changed: 17 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
# About Mapbox Tokens
2
2
3
-
`react-map-gl` itself is open source and free. It provides a React wrapper for `mapbox-gl`or derived projects.
4
-
Depending on which Mapbox GL JS version (or fork) you use, you may need a Mapbox token. You will need a Mapbox token if you use:
3
+
`react-map-gl` itself is open source and free. It provides a React wrapper for `mapbox-gl`, `maplibre-gl`or compatible projects.
4
+
Depending on which base map library you use, you may need a Mapbox token. You will need a Mapbox token if you use:
5
5
6
-
-[mapbox-gl@>=2.0.0](https://github.com/mapbox/mapbox-gl-js/releases/tag/v2.0.0)and above - requires a mapbox access token in order to access the map renderer, and generates billable events regardlesss of whether you are displaying your own maps.
7
-
-`[email protected]` or [maplibre-gl](https://github.com/maplibre/maplibre-gl-js) - requires an access token only if you load the map styles and tiles from Mapbox's data service. See "Display Maps Without A Mapbox Token" section below for using non-Mapbox tiles.
6
+
-[mapbox-gl@>=2.0.0](https://github.com/mapbox/mapbox-gl-js/releases/tag/v2.0.0) - requires a mapbox access token in order to access the map renderer, and generates billable events regardlesss of whether you are displaying your own maps.
7
+
-`[email protected]` or `maplibre-gl@1.x` - requires an access token only if you load the map styles and tiles from Mapbox's data service. See "Display Maps Without A Mapbox Token" section below for using non-Mapbox tiles.
8
8
9
-
To get a Mapbox token, you will need to register on [their website](https://www.mapbox.com). The token will be used to identify you and start serving up map tiles. The service is free until a certain level of traffic is exceeded.
9
+
To get a Mapbox token, you will need to register on [the Mapbox website](https://www.mapbox.com). The token will be used to identify you and start serving up map tiles. The service is free until a certain level of traffic is exceeded.
10
10
11
11
There are several ways to provide a token to your app, as showcased in some of the example folders:
12
12
@@ -18,22 +18,25 @@ We recommend using an environment variable to minimize leaking risks. See [secur
18
18
19
19
## Display Maps Without A Mapbox Token
20
20
21
-
It is possible to use the map component without the Mapbox service, if you use another tile source (for example, if you host your own map tiles). Note that this is no longer allowed using mapbox-gl v2.0 and above. The options are:
21
+
It is possible to use the map component without the Mapbox service, if you use another tile source (for example, if you host your own map tiles). Note that this is no longer allowed using `mapbox-gl` v2.0 and above. The options are:
22
22
23
+
- Use [maplibre-gl](https://maplibre.org/maplibre-gl-js-docs/api/). See [Get Started](./get-started.md) for how to configure your project.
23
24
- Stay on `[email protected]`. react-map-gl plans to continue supporting this release in the foreseeable future, however, this version will not include any of the latest features of the map renderer, nor get any future updates from Mapbox.
24
-
- Use a community fork of mapbox-gl, for example [maplibre-gl](https://www.npmjs.com/package/maplibre-gl). See [Get Started](./get-started.md) for how to configure your project.
25
25
26
-
To use your own map service, you will need a custom Mapbox GL style that points to your own [vector tile source](https://www.mapbox.com/mapbox-gl-js/style-spec/), and pass it to `Map` using the `mapStyle` prop. This custom style must match the schema of your tile source.
26
+
To use your own map service, you will need a custom map style that points to your own [tile source](https://maplibre.org/maplibre-style-spec/sources/), and pass it to `Map` using the `mapStyle` prop.
-[List of open source tools](https://github.com/mapbox/awesome-vector-tiles)
37
40
38
41
If you are using a third party service that requires header based authentication, you can do this by defining a function to pass to `Map` using the `transformRequest` prop.
0 commit comments