Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/visgl/react-map-gl
React friendly API wrapper around MapboxGL JS
https://github.com/visgl/react-map-gl
data-visualization map mapbox-gl mapbox-gl-js react uber webgl
Last synced: 7 days ago
JSON representation
React friendly API wrapper around MapboxGL JS
- Host: GitHub
- URL: https://github.com/visgl/react-map-gl
- Owner: visgl
- License: other
- Created: 2015-10-08T16:56:26.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-15T10:53:55.000Z (6 months ago)
- Last Synced: 2024-05-20T10:12:20.345Z (6 months ago)
- Topics: data-visualization, map, mapbox-gl, mapbox-gl-js, react, uber, webgl
- Language: TypeScript
- Homepage: http://visgl.github.io/react-map-gl/
- Size: 30.9 MB
- Stars: 7,606
- Watchers: 1,955
- Forks: 1,334
- Open Issues: 83
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-react-cn - react-map-gl - A React wrapper for MapboxGL-js plus overlay API (Uncategorized / Uncategorized)
- awesome-github-repos - visgl/react-map-gl - React friendly API wrapper around MapboxGL JS (TypeScript)
- awesome-dataviz - React Map GL
- awesome-list - react-map-gl
- best-of-react - GitHub - 7% open · ⏱️ 23.05.2024): (Other Components)
- awesome-react - react-map-gl - React friendly API wrapper around MapboxGL JS (**Awesome React** [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome) / React)
- StarryDivineSky - visgl/react-map-gl
- jimsghstars - visgl/react-map-gl - React friendly API wrapper around MapboxGL JS (TypeScript)
README
react-map-gl | Docs
`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/). More information in the online documentation.
See our [Design Philosophy](docs/README.md#design-philosophy).
### Installation
Using `react-map-gl` requires `react >= 16.3`.
```sh
npm install --save react-map-gl mapbox-gl
```### Example
```js
import * as React from 'react';
import Map from 'react-map-gl';function App() {
return ;
}
```### Using Mapbox Tokens
**Starting with v2.0, mapbox-gl requires a Mapbox token for any usage, with or without the Mapbox data service. See [about Mapbox tokens](/docs/get-started/mapbox-tokens.md) for your options.**
To show maps from a service such as Mapbox you will need to register on their website in order to retrieve an access token required by the map component, which will be used to identify you and start serving up map tiles. The service will be free until a certain level of traffic is exceeded.
There are several ways to provide a token to your app, as showcased in some of the example folders:
* Provide a `mapboxAccessToken` prop to the map component
* Set the `MapboxAccessToken` environment variable (or set `REACT_APP_MAPBOX_ACCESS_TOKEN` if you are using Create React App)
* Provide it in the URL, e.g `?access_token=TOKEN`### Contribute
See [contribution guide](/CONTRIBUTING.md).
### Attributions
react-map-gl is part of vis.gl, an [Urban Computing Foundation](https://uc.foundation) project.
Development is also supported by