pickWorldPosition
A callback function used to pick the world position from which to pan. The function is called with Scene, the Cartesian2 screen space position, and a Cartesian3 instance to store the result. The function should return the Cartesian3 world position from which to pan, or undefined if no position could be picked. If undefined is returned, the camera will pan relative to the ellipsoid surface below the camera.
const mapCameraController = new ScreenSpaceMapCameraController();
mapCameraController.pickWorldPosition = function (scene, windowPosition, result) {
// Pick the world position from the depth buffer
return scene.pickPosition(windowPosition, result);
};
viewer.addController(mapCameraController);Content copied to clipboard