React Three Map - MapLibre variant
This module provides the MapLibre GL JS integration for react-three-map. Use this when working with MapLibre GL JS and react-map-gl/maplibre.
react-map-gl/maplibre
import "maplibre-gl/dist/maplibre-gl.css";import Map from "react-map-gl/maplibre";import { Canvas, Coordinates, useMap, coordsToVector3 } from "@wendylabsinc/react-three-map/maplibre";function App() { return ( <Map initialViewState={{ latitude: 51.5074, longitude: -0.1278, zoom: 15 }} mapStyle="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json" > <Canvas latitude={51.5074} longitude={-0.1278}> <mesh> <boxGeometry args={[100, 100, 100]} /> <meshStandardMaterial color="red" /> </mesh> </Canvas> </Map> );} Copy
import "maplibre-gl/dist/maplibre-gl.css";import Map from "react-map-gl/maplibre";import { Canvas, Coordinates, useMap, coordsToVector3 } from "@wendylabsinc/react-three-map/maplibre";function App() { return ( <Map initialViewState={{ latitude: 51.5074, longitude: -0.1278, zoom: 15 }} mapStyle="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json" > <Canvas latitude={51.5074} longitude={-0.1278}> <mesh> <boxGeometry args={[100, 100, 100]} /> <meshStandardMaterial color="red" /> </mesh> </Canvas> </Map> );}
React Three Map - MapLibre variant
This module provides the MapLibre GL JS integration for react-three-map. Use this when working with MapLibre GL JS and
react-map-gl/maplibre.Example