cesium自定义气泡随着球转动

    var setPosition = function () {                                                  // 世界坐标
        var changedC = Cesium.SceneTransforms.wgs84ToWindowCoordinates(viewer.scene, position);
        if (changedC) {
            var x = changedC.x;
            var y = changedC.y;
            $('#box').css('left', x + 'px');
            $('#box').css('top', y - 10 + 'px');
        }

    };

    viewer.scene.postRender.addEventListener(setPosition);

猜你喜欢

转载自blog.csdn.net/qq_40043761/article/details/80924996
今日推荐