Function rayCastWorldCoordinates

  • Casts a ray in NDC space from the current map view and returns the intersection point of that ray wih the map in world space.

    Parameters

    • mapView: MapView | {
          camera: Camera;
          projection: Projection;
      }

      Instance of MapView.

    • pointOnScreenXinNDC: number

      X coordinate in NDC space.

    • pointOnScreenYinNDC: number

      Y coordinate in NDC space.

    • Optional elevation: number

      Optional param used to offset the ground plane. Used when wanting to pan based on a plane at some altitude. Necessary for example when panning with terrain.

    Returns THREE.Vector3 | null

    Intersection coordinates, or null if raycast failed.

Generated using TypeDoc