赞
踩
不介绍百度API了,自行百度
创建全景图对象panorama
获取全景图的视角和位置,调整Cesium相机视角
- let m = bdto84([panorama.getPosition().lng, panorama.getPosition().lat]);
- viewer.camera.setView({
- destination: new Cesium.Cartesian3.fromDegrees(m[0], m[1], 8.5),
- orientation: {
- heading: Cesium.Math.toRadians(panorama.getPov().heading),
- pitch: Cesium.Math.toRadians(panorama.getPov().pitch + 3),
- roll: 0.0
- }
- });
获取Cesium相机视角和位置,计算偏移量后设置全景图视角及位置
- panorama.setPosition(new BMap.Point(wgs84tobd(y_bd, x_bd)[0], wgs84tobd(y_bd, x_bd)[1]));
- panorama.setPov({
- heading: viewer.scene.camera.heading * (180 / Math.PI),
- pitch: viewer.scene.camera.pitch * (180 / Math.PI)
- });
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。