Skip to content

Commit 557920a

Browse files
committed
update docs and add changeset
1 parent 479dcb2 commit 557920a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.changeset/stupid-tigers-relate.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"react-three-map": minor
3+
---
4+
5+
Add Mapbox support.
6+
7+
- If you use **Mapbox** `import { Canvas } from "react-three-map"`
8+
- If you use **Maplibre** `import { Canvas } from "react-three-map/maplibre"`

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ import React, { useRef, useState } from 'react'
4949
import { useFrame } from "@react-three/fiber"
5050
import { useRef, useState } from "react"
5151
import Map from "react-map-gl/maplibre"
52-
import { Canvas } from "react-three-map"
52+
import { Canvas } from "react-three-map/maplibre"
53+
// import { Canvas } from "react-three-map" // if you are using MapBox
5354

5455
function BasicExample() {
5556
return <Map
@@ -93,7 +94,8 @@ Same as in `@react-three/fiber`, the `<Canvas>` object is where you start to def
9394
```tsx
9495
import "maplibre-gl/dist/maplibre-gl.css"
9596
import Map from "react-map-gl/maplibre"
96-
import { Canvas } from 'react-three-map'
97+
import { Canvas } from 'react-three-map/maplibre'
98+
// import { Canvas } from "react-three-map" // if you are using MapBox
9799

98100
const App = () => (
99101
<Map

0 commit comments

Comments
 (0)