Const
Hook to access the Mapbox GL JS map instance from within a Canvas.
The Mapbox GL JS Map instance
import { useMap } from "@wendylabsinc/react-three-map";function MyComponent() { const map = useMap(); // map is typed as mapbox-gl Map console.log(map.getZoom()); return null;} Copy
import { useMap } from "@wendylabsinc/react-three-map";function MyComponent() { const map = useMap(); // map is typed as mapbox-gl Map console.log(map.getZoom()); return null;}
Hook to access the Mapbox GL JS map instance from within a Canvas.