React Three Map - v1.1.0
    Preparing search index...
    • Let the MapLibre camera go below the ground, or below terrain.

      MapLibre >= 5 accepts a maxPitch of up to 180 degrees, but pushes the camera back above the ground whenever it would end up below it. This lifts that constraint so you can look up at the map from underground, or fly through tunnels, pipes and other underground assets.

      Combine it with:

      • maxPitch above 90 to look up from below the map.
      • centerClampedToGround={false} and map.setCenterElevation(meters) to orbit around a point below the ground.

      It is not available with Mapbox, which caps the pitch at 85 degrees and keeps its camera above the terrain.

      Parameters

      Returns () => void

      a function that restores MapLibre's default behaviour

      This replaces a private MapLibre method (_elevateCameraIfInsideTerrain, MapLibre 5), and does nothing (with a warning) on versions that don't have it.

      const map = useMap(); // inside <Canvas>
      useEffect(() => allowUndergroundCamera(map, { minAltitude: -500 }), [map]);

      UndergroundCamera for the component version