Update links in docs and examples

This commit is contained in:
Xiaoji Chen 2023-06-30 11:36:39 -07:00
parent 55c888357a
commit 4c187eddd8
53 changed files with 58 additions and 58 deletions

View File

@ -3,8 +3,8 @@
<p align="center">
These docs are for
<a href="https://github.com/visgl/react-map-gl/tree/7.0-release/docs">
<img src="https://img.shields.io/badge/v7.0-brightgreen.svg?style=flat-square" />
<a href="https://github.com/visgl/react-map-gl/tree/7.1-release/docs">
<img src="https://img.shields.io/badge/v7.1-brightgreen.svg?style=flat-square" />
</a>
Looking for an old version?
<a href="https://github.com/visgl/react-map-gl/tree/6.1-release/docs">

View File

@ -84,4 +84,4 @@ Placement of the control relative to the map.
## Source
[attribution-control.ts](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/attribution-control.ts)
[attribution-control.ts](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/attribution-control.ts)

View File

@ -78,4 +78,4 @@ Placement of the control relative to the map.
## Source
[fullscreen-control.ts](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/fullscreen-control.ts)
[fullscreen-control.ts](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/fullscreen-control.ts)

View File

@ -163,4 +163,4 @@ function App() {
## Source
[geolocate-control.ts](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/geolocate-control.ts)
[geolocate-control.ts](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/geolocate-control.ts)

View File

@ -109,4 +109,4 @@ Note that layers are added by the order that they mount. They are *NOT* reordere
## Source
[layer.ts](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/layer.ts)
[layer.ts](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/layer.ts)

View File

@ -23,4 +23,4 @@ See [useMap](./use-map.md) for more information.
## Source
[use-map.tsx](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/use-map.tsx)
[use-map.tsx](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/use-map.tsx)

View File

@ -623,4 +623,4 @@ Returns the native `Map` ([Mapbox](https://docs.mapbox.com/mapbox-gl-js/api/map/
## Source
[map.tsx](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/map.tsx)
[map.tsx](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/map.tsx)

View File

@ -213,4 +213,4 @@ function App() {
## Source
[marker.ts](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/marker.ts)
[marker.ts](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/marker.ts)

View File

@ -83,4 +83,4 @@ Placement of the control relative to the map.
## Source
[navigation-control.ts](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/navigation-control.ts)
[navigation-control.ts](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/navigation-control.ts)

View File

@ -188,4 +188,4 @@ function App() {
## Source
[popup.ts](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/popup.ts)
[popup.ts](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/popup.ts)

View File

@ -89,4 +89,4 @@ Placement of the control relative to the map.
## Source
[scale-control.ts](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/scale-control.ts)
[scale-control.ts](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/scale-control.ts)

View File

@ -112,4 +112,4 @@ Required. Type of the source.
## Source
[source.ts](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/source.ts)
[source.ts](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/source.ts)

View File

@ -85,4 +85,4 @@ Returns:
## Source
[use-control.ts](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/use-control.ts)
[use-control.ts](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/use-control.ts)

View File

@ -123,7 +123,7 @@ function NavigateButton() {
</TabItem>
</Tabs>
See a full example [here](https://github.com/visgl/react-map-gl/tree/7.0-release/examples/get-started/hook).
See a full example [here](https://github.com/visgl/react-map-gl/tree/7.1-release/examples/get-started/hook).
## Signature
@ -135,4 +135,4 @@ If the hook is used inside a decendent of a `Map` component, the returned object
## Source
[use-map.tsx](https://github.com/visgl/react-map-gl/tree/7.0-release/src/components/use-map.tsx)
[use-map.tsx](https://github.com/visgl/react-map-gl/tree/7.1-release/src/components/use-map.tsx)

View File

@ -49,7 +49,7 @@ For dynamically updating data sources and layers, check out the [GeoJSON](http:/
## Custom Overlays
You can implement a custom HTML or SVG overlay on top of the map that redraws whenever the camera changes. By calling `map.project()` you can adjust the DOM or CSS properties so that the customly-drawn features are always aligned with the map. See a full example [here](https://github.com/visgl/react-map-gl/tree/7.0-release/examples/custom-overlay).
You can implement a custom HTML or SVG overlay on top of the map that redraws whenever the camera changes. By calling `map.project()` you can adjust the DOM or CSS properties so that the customly-drawn features are always aligned with the map. See a full example [here](https://github.com/visgl/react-map-gl/tree/7.1-release/examples/custom-overlay).
## Other vis.gl Libraries

View File

@ -1,6 +1,6 @@
# Get Started
You may find complete project setups in [get-started examples](https://github.com/visgl/react-map-gl/tree/7.0-release/examples/get-started).
You may find complete project setups in [get-started examples](https://github.com/visgl/react-map-gl/tree/7.1-release/examples/get-started).
## Installation

View File

@ -8,7 +8,7 @@ There are two ways to use a [Map](../api-reference/map.md):
## Uncontrolled Map
You may clone a full app configuration for this example [here](https://github.com/visgl/react-map-gl/tree/7.0-release/examples/get-started/basic).
You may clone a full app configuration for this example [here](https://github.com/visgl/react-map-gl/tree/7.1-release/examples/get-started/basic).
```tsx
import * as React from 'react';
@ -28,7 +28,7 @@ function App() {
## Controlled Map
You may clone a full app configuration for this example [here](https://github.com/visgl/react-map-gl/tree/7.0-release/examples/get-started/controlled).
You may clone a full app configuration for this example [here](https://github.com/visgl/react-map-gl/tree/7.1-release/examples/get-started/controlled).
```tsx
import * as React from 'react';
@ -51,8 +51,8 @@ function App() {
A real-world application likely uses more complicated state flows:
- Using map with a state store (Redux) [example](https://github.com/visgl/react-map-gl/tree/7.0-release/examples/get-started/redux)
- Using map with SSR (Next.js) [example](https://github.com/visgl/react-map-gl/tree/7.0-release/examples/get-started/nextjs)
- Using map with a state store (Redux) [example](https://github.com/visgl/react-map-gl/tree/7.1-release/examples/get-started/redux)
- Using map with SSR (Next.js) [example](https://github.com/visgl/react-map-gl/tree/7.1-release/examples/get-started/nextjs)
## Custom Camera Constraints

View File

@ -2,7 +2,7 @@
## react-map-gl v7.1
Release date: June 2023
Release date: June 30 2023
- To better accommodate the API divergence between Mapbox and Maplibre, this version adds a new endpoint `react-map-gl/maplibre`. The new endpoint exports identical components as `react-map-gl`, but typed for `maplibre-gl` instead. After switching to this new endpoint, `maplibre-gl` users no longer need to install `mapbox-gl` or a placeholder package as dependency. See [upgrade guide](./upgrade-guide.md) for an example.
- `Marker`, `Popup` and `GeolocateControl` components now expose the native instance via React ref.

View File

@ -7,7 +7,7 @@
"dependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta",
"react-map-gl": "^7.1.0",
"mapbox-gl": "^2.0.0"
},
"devDependencies": {

View File

@ -7,7 +7,7 @@ function ControlPanel() {
<p>Use Mapbox GL JS' built-in functions to visualize points as clusters.</p>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/clusters"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/clusters"
target="_new"
>
View Code

View File

@ -7,7 +7,7 @@
"dependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta",
"react-map-gl": "^7.1.0",
"mapbox-gl": "^2.0.0"
},
"devDependencies": {

View File

@ -16,7 +16,7 @@ function ControlPanel() {
</p>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/controls"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/controls"
target="_new"
>
View Code

View File

@ -7,7 +7,7 @@
"dependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta",
"react-map-gl": "^7.1.0",
"mapbox-gl": "^2.0.0"
},
"devDependencies": {

View File

@ -50,7 +50,7 @@ function StyleControls(props) {
<p>Customize the cursor based on interactivity.</p>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/custom-cursor"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/custom-cursor"
target="_new"
>
View Code

View File

@ -8,7 +8,7 @@
"d3-shape": "^3.1.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta",
"react-map-gl": "^7.1.0",
"mapbox-gl": "^2.0.0"
},
"devDependencies": {

View File

@ -32,7 +32,7 @@ function ControlPanel() {
</p>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/custom-overlay"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/custom-overlay"
target="_new"
>
View Code

View File

@ -8,7 +8,7 @@
"deck.gl": "^8.8.0-beta.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta",
"react-map-gl": "^7.1.0",
"mapbox-gl": "^2.0.0"
},
"devDependencies": {

View File

@ -8,7 +8,7 @@
"mapbox-gl": "^2.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta"
"react-map-gl": "^7.1.0"
},
"devDependencies": {
"typescript": "^4.0.0",

View File

@ -26,7 +26,7 @@ function ControlPanel(props: {events: Record<string, LngLat>}) {
</div>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/draggable-markers"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/draggable-markers"
target="_new"
>
View Code

View File

@ -10,7 +10,7 @@
"@turf/area": "^6.5.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta",
"react-map-gl": "^7.1.0",
"mapbox-gl": "^2.0.0"
},
"devDependencies": {

View File

@ -18,7 +18,7 @@ function ControlPanel(props) {
)}
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/draw-polygon"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/draw-polygon"
target="_new"
>
View Code

View File

@ -8,7 +8,7 @@
"mapbox-gl": "^2.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta"
"react-map-gl": "^7.1.0"
},
"devDependencies": {
"typescript": "^4.0.0",

View File

@ -7,7 +7,7 @@ function ControlPanel() {
<p>Hover over counties to highlight counties that share the same name.</p>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/filter"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/filter"
target="_new"
>
View Code

View File

@ -9,7 +9,7 @@
"@types/mapbox__mapbox-gl-geocoder": "^4.7.2",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta",
"react-map-gl": "^7.1.0",
"mapbox-gl": "^2.0.0"
},
"devDependencies": {

View File

@ -6,7 +6,7 @@ function ControlPanel(props) {
<h3>Geocoder</h3>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/geocoder"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/geocoder"
target="_new"
>
View Code

View File

@ -7,7 +7,7 @@
"dependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta",
"react-map-gl": "^7.1.0",
"mapbox-gl": "^2.0.0"
},
"devDependencies": {

View File

@ -7,7 +7,7 @@ function ControlPanel() {
<p>Render animation by updating GeoJSON data source.</p>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/geojson-animation"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/geojson-animation"
target="_new"
>
View Code

View File

@ -10,7 +10,7 @@
"mapbox-gl": "^2.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta"
"react-map-gl": "^7.1.0"
},
"devDependencies": {
"typescript": "^4.0.0",

View File

@ -15,7 +15,7 @@ function ControlPanel(props) {
</p>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/geojson"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/geojson"
target="_new"
>
View Code

View File

@ -7,7 +7,7 @@
"dependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta",
"react-map-gl": "^7.1.0",
"mapbox-gl": "^2.0.0"
},
"devDependencies": {

View File

@ -57,7 +57,7 @@ function ControlPanel(props) {
</p>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/heatmap"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/heatmap"
target="_new"
>
View Code

View File

@ -7,7 +7,7 @@
"dependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta",
"react-map-gl": "^7.1.0",
"mapbox-gl": "^2.0.0"
},
"devDependencies": {

View File

@ -47,7 +47,7 @@ function ControlPanel(props) {
<p>Turn interactive features off/on.</p>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/interaction"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/interaction"
target="_new"
>
View Code

View File

@ -9,7 +9,7 @@
"mapbox-gl": "^2.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta"
"react-map-gl": "^7.1.0"
},
"devDependencies": {
"typescript": "^4.0.0",

View File

@ -82,7 +82,7 @@ function StyleControls(props) {
<p>Dynamically show/hide map layers and change color with Immutable map style.</p>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/layers"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/layers"
target="_new"
>
View Code

View File

@ -8,7 +8,7 @@
"mapbox-gl": "^2.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta"
"react-map-gl": "^7.1.0"
},
"devDependencies": {
"typescript": "^4.0.0",

View File

@ -26,7 +26,7 @@ function ControlPanel(props: {mode: Mode; onModeChange: (newMode: Mode) => void}
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/side-by-side"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/side-by-side"
target="_new"
>
View Code

View File

@ -8,7 +8,7 @@
"mapbox-gl": "^2.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta"
"react-map-gl": "^7.1.0"
},
"devDependencies": {
"typescript": "^4.0.0",

View File

@ -8,7 +8,7 @@ function ControlPanel(props) {
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/terrain"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/terrain"
target="_new"
>
View Code

View File

@ -7,7 +7,7 @@
"dependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta",
"react-map-gl": "^7.1.0",
"mapbox-gl": "^2.0.0"
},
"devDependencies": {

View File

@ -9,7 +9,7 @@ function ControlPanel(props) {
<p>Smooth animate of the viewport.</p>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/viewport-animation"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/viewport-animation"
target="_new"
>
View Code

View File

@ -9,7 +9,7 @@
"mapbox-gl": "^2.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-map-gl": "^7.1.0-beta"
"react-map-gl": "^7.1.0"
},
"devDependencies": {
"typescript": "^4.0.0",

View File

@ -7,7 +7,7 @@ function ControlPanel() {
<p>Click on a San Fransisco Neighborhood to zoom in.</p>
<div className="source-link">
<a
href="https://github.com/visgl/react-map-gl/tree/7.0-release/examples/zoom-to-bounds"
href="https://github.com/visgl/react-map-gl/tree/7.1-release/examples/zoom-to-bounds"
target="_new"
>
View Code