Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add maplibre in docs intro #2384

Merged
merged 5 commits into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
8 changes: 4 additions & 4 deletions docs/get-started/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand All @@ -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')} />;
}
```
```
2 changes: 1 addition & 1 deletion docs/get-started/mapbox-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Depending on which base map library 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) - 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@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.
- `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.
birkskyum marked this conversation as resolved.
Show resolved Hide resolved

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.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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.2.0-beta.1",
"keywords": [
"mapbox",
Expand Down
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions website/src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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" />

Expand All @@ -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>
Expand All @@ -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>
Expand Down
Loading