一、HeadingPitchRoll表示Heading、Pitch、Roll,用于orientation属性上的,比如camera的setView,flyTo
var heading = Cesium.Math.toRadians(0.0);var pitch = Cesium.Math.toRadians(-25.0);var roll = Cesium.Math.toRadians(0);viewer.camera.flyTo({destination: Cesium.Rectangle.fromDegrees(110.2, 35.6, 112.3, 36.7),orientation: new Cesium.HeadingPitchRoll(heading, pitch, roll),});
二、 HeadingPitchRange表示Heading、Pitch、Range,其中Heading、Pitch和HeadingPitchRoll中的Heading、Pitch表示的含义是相同的,Range表示相机距离目标的距离,用于viewer的flyTo
var heading = Cesium.Math.toRadians(0.0);var pitch = Cesium.Math.toRadians(-25.0);var range = 100;var entity = viewer.entities.add({rectangle: {coordinates: Cesium.Rectangle.fromDegrees(110.2, 35.6, 112.3, 36.7),material: Cesium.Color.GREEN.withAlpha(1.0),height: 10.0,outline: false,},});viewer.flyTo(entity, {offset: new Cesium.HeadingPitchRange(heading, pitch, range),});