Add maplibre in docs intro (#2384)

This commit is contained in:
Birk Skyum 2024-07-07 01:07:04 +02:00 committed by Chris Gervang
parent f9f5b20adb
commit f9ac790eb5
No known key found for this signature in database
GPG Key ID: 364F9E85BFA0CEE2
6 changed files with 12 additions and 12 deletions

View File

@ -20,7 +20,7 @@ react-map-gl is a suite of [React](http://facebook.github.io/react/) components
| Library | Description |
| --- | --- |
| [MapLibre](https://github.com/MapLibre/maplibre-gl-js) | An open fork of mapbox-gl v1, that can be used without a mapbox token. |
| [MapLibre GL JS](https://github.com/MapLibre/maplibre-gl-js) | An open fork of mapbox-gl v1, that can be used without a mapbox token. |
| [Mapbox GL JS v1](https://github.com/mapbox/mapbox-gl-js) | The previous version of mapbox GL JS. This version is free open source and can be used with non-mapbox basemaps without a mapbox token. |
| [Mapbox GL JS v2](https://github.com/mapbox/mapbox-gl-js) | The latest version of Mapbox GL JS. Note that version 2 is not free open source, and a mapbox token is required and billable events are generated even if you do not use mapbox hosted basemaps. |
| Other mapbox-gl forks | It may be possible to use react-map-gl with other mapbox forks, but this is not a supported use case. Minor PRs to enable other forks to be used may be accepted. |

View File

@ -129,7 +129,7 @@ import 'maplibre-gl/dist/maplibre-gl.css';
## Using with a Compatible Fork
```bash
npm install --save react-map-gl my-mapbox-fork
npm install --save react-map-gl my-map-gl-fork
```
Then override the `mapLib` prop of `Map`:
@ -139,9 +139,9 @@ import * as React from 'react';
import Map from 'react-map-gl';
// Include style sheet
import 'my-mapbox-fork/path/to/style-sheet.css';
import 'my-map-gl-fork/path/to/style-sheet.css';
function App() {
return <Map mapLib={import('my-mapbox-fork')} />;
return <Map mapLib={import('my-map-gl-fork')} />;
}
```
```

View File

@ -3,8 +3,8 @@
`react-map-gl` itself is open source and free. It provides a React wrapper for `mapbox-gl` or derived projects.
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:
- [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.
- `mapbox-gl@1.x` 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.
- [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.
- `mapbox-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.
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.

View File

@ -1,6 +1,6 @@
{
"name": "react-map-gl",
"description": "React components for Mapbox GL JS-compatible libraries",
"description": "React components for MapLibre GL JS and Mapbox GL JS",
"version": "7.1.7",
"keywords": [
"mapbox",

View File

@ -9,7 +9,7 @@ const {resolve} = require('path');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'React Map GL',
tagline: 'React wrapper for Mapbox GL JS',
tagline: 'React wrapper for MapLibre GL JS and Mapbox GL JS',
url: 'https://visgl.github.io/',
baseUrl: '/react-map-gl/',
onBrokenLinks: 'throw',

View File

@ -57,7 +57,7 @@ export default function IndexPage() {
<div style={{position: 'relative'}}>
<TextContainer>
<h2>
react-map-gl makes using Mapbox GL JS in React applications easy.
react-map-gl makes using MapLibre GL JS and Mapbox GL JS in React applications easy.
</h2>
<hr className="short" />
@ -66,7 +66,7 @@ export default function IndexPage() {
React Integration
</h3>
<p>
Use Mapbox GL JS Map as a fully controlled reactive component.
Use a MapLibre GL JS or Mapbox GL JS map as a fully controlled reactive component.
</p>
<h3>
@ -88,7 +88,7 @@ export default function IndexPage() {
target="_blank"
rel="noopener noreferrer">
deck.gl</a> to render performant and compelling 2D and 3D
WebGL visualizations on top of your Mapbox GL JS based maps.
WebGL visualizations on top of your MapLibre GL JS and Mapbox GL JS based maps.
</p>
</TextContainer>
</div>