Skip to content

Commit

Permalink
Update Carto basemap guide about Mapbox-GL v2.0 (visgl#5632)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkreidler authored May 7, 2021
1 parent 92482fa commit 5cc8cbd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/api-reference/carto/basemap.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

[CARTO basemaps](https://carto.com/basemaps/) are available and they can be used without a token.

Ensure you follow the [Terms and Conditions](https://drive.google.com/file/d/0B3OBExqwT6KJNHp3U3VUamx6U1U/view) when using them.
Ensure you follow the [Terms and Conditions](https://drive.google.com/file/d/1P7bhSE-N9iegI398QYDjKeVhnbS7-Ilk/view) when using them.


## Usage

### React

**Important Note:** Mapbox-GL-JS v2.0 changed to a license that requires an API key for loading the library, which will prevent you from using `react-map-gl` ( a higher level library). They have an in-depth guide about it [here](https://github.com/visgl/react-map-gl/blob/v6.0.0/docs/get-started/mapbox-tokens.md).

In short, if you want to use the library without a Mapbox token, then you have two options: use a `react-map-gl` version less than 6.0 (`npm i react-map-gl@5`), or [substitute `mapbox-gl` with a fork](https://github.com/visgl/react-map-gl/blob/v6.0.0/docs/get-started/get-started.md#using-with-a-mapbox-gl-fork).

To install the dependencies from NPM:

```bash
Expand All @@ -24,6 +30,8 @@ import {BASEMAP} from '@deck.gl/carto';
</DeckGL>
```

### Standalone

To use pre-bundled scripts:

```html
Expand Down

0 comments on commit 5cc8cbd

Please sign in to comment.