Skip to content

Commit 9d09559

Browse files
Update documentation about tokens (visgl#2204)
1 parent 55c8883 commit 9d09559

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<h1 align="center">react-map-gl | <a href="https://visgl.github.io/react-map-gl">Docs</a></h1>
1313

14-
`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.
1515

1616
See our [Design Philosophy](docs/README.md#design-philosophy).
1717

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</p>
1717

1818
react-map-gl is a suite of [React](http://facebook.github.io/react/) components for
19-
Mapbox GL JS-compatible libraries.
19+
[mapbox-gl](https://github.com/mapbox/mapbox-gl-js), [maplibre-gl](https://maplibre.org/maplibre-gl-js-docs/api/) or compatible libraries.
2020

2121
| Library | Description |
2222
| --- | --- |

docs/get-started/mapbox-tokens.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# About Mapbox Tokens
22

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:
55

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.
88

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.
1010

1111
There are several ways to provide a token to your app, as showcased in some of the example folders:
1212

@@ -18,22 +18,25 @@ We recommend using an environment variable to minimize leaking risks. See [secur
1818

1919
## Display Maps Without A Mapbox Token
2020

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:
2222

23+
- Use [maplibre-gl](https://maplibre.org/maplibre-gl-js-docs/api/). See [Get Started](./get-started.md) for how to configure your project.
2324
- 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.
2525

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.
2727

28-
Open source tile schemas include:
28+
Some alternative map data providers include:
2929

30-
- [TileZen schema](https://tilezen.readthedocs.io/en/latest/layers/)
31-
- [OpenMapTiles schema ](https://openmaptiles.org/schema/)
30+
- [MapTiler](https://www.maptiler.com)
31+
- [Amazon Location Service](https://docs.aws.amazon.com/location/latest/developerguide/map-concepts.html)
3232

33-
Some useful resources for creating your own map service:
33+
Useful resources for creating your own map tiles and service:
3434

35-
- [Mapbox Vector Tile Spec](https://www.mapbox.com/developers/vector-tiles/)
36-
- [Open source tools](https://github.com/mapbox/awesome-vector-tiles)
35+
- [Martin Tile Server](https://maplibre.org/martin/introduction.html)
36+
- [OpenMapTiles](https://openmaptiles.org)
37+
- [Mapbox Vector Tile Spec](https://github.com/mapbox/vector-tile-spec)
38+
- [PMTiles](https://github.com/protomaps/PMTiles)
39+
- [List of open source tools](https://github.com/mapbox/awesome-vector-tiles)
3740

3841
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.
3942

0 commit comments

Comments
 (0)