Function constrainTargetAndDistanceToViewBounds

  • Constrains given camera target and distance to MapView.maxBounds.

    Parameters

    • target: Vector3

      The camera target.

    • distance: number

      The camera distance.

    • mapView: MapView

      The map view whose maximum bounds will be used as constraints.

    Returns {
        distance: number;
        target: THREE.Vector3;
    }

    constrained target and distance, or the unchanged input arguments if the view does not have maximum bounds set.

    • distance: number
    • target: THREE.Vector3

    Remarks

    The resulting target and distance will keep the view within the maximum bounds for a camera with tilt and yaw set to 0.

Generated using TypeDoc