您好,我这边测试了一下是可以的。经纬度那里不要加引号
具体代码如下
var scene = viewer.scene;
var position = Cesium.Cartesian3.fromDegrees(116.71261436907912,39.895686008451534);
console.log(position);
var cartesian2= Cesium.SceneTransforms.wgs84ToWindowCoordinates(scene, position);
console.log(cartesian2);