suerprisePlus
2024-08-21 7d57b0fef0f220dfe7c868ce1113a7ce6eb6c468
src/assets/js/mapSdk/mapConfig.js
@@ -7,29 +7,31 @@
                y: res.y,
                z: res.z,
            },
            orientation: {
                heading:res.heading,
                pitch: res.pitch,
                roll: res.roll,
            },
        });
    },
    userSceneFlyTo(res){
    userSceneFlyTo(res) {
        const options = {
            duration: 2,
            offset: new SmartEarth.Cesium.HeadingPitchRange(1.0, -0.3, 1000)
            offset: new SmartEarth.Cesium.HeadingPitchRange(1.0, -0.3, 1000),
        };
        earthCtrl.userScene.flyTo(res,options);
        earthCtrl.userScene.flyTo(res, options);
    },
    getModelMatrix(res) {
        var headingPitchRoll = new Cesium.HeadingPitchRoll(res.heading, res.pitch, res.roll);
        var position = Cesium.Cartesian3.fromDegrees(res.longitude, res.latitude, res.altitude);
        var modelMatrix = Cesium.Transforms.headingPitchRollToFixedFrame(
            position, headingPitchRoll, Cesium.Ellipsoid.WGS84,
            Cesium.Transforms.eastNorthUpToFixedFrame,
            new Cesium.Matrix4());
        var modelMatrix = Cesium.Transforms.headingPitchRollToFixedFrame(position, headingPitchRoll, Cesium.Ellipsoid.WGS84, Cesium.Transforms.eastNorthUpToFixedFrame, new Cesium.Matrix4());
        return modelMatrix;
    },
    getWKTParse(res){
        return WKT.parse(res)
    getWKTParse(res) {
        return WKT.parse(res);
    },
    getWKTConvert(res){
        return WKT.convert(res)
    }
    getWKTConvert(res) {
        return WKT.convert(res);
    },
};
export default mapConfig;
export default mapConfig;