export const MAP_3D_BEGIN_CALC = (lineStringData, geoData) => {
// 画方向线
map.entities.add({
name: 'uav-tmp-line',
polyline: {
positions: Cesium.Cartesian3.fromDegreesArray(lineStringData),
material: new Cesium.PolylineArrowMaterialProperty(Cesium.Color.RED),//创建线段的材质,设置方向
followSurface: true, //表示路径是否跟随地形,如果为true,则路径将会根据地形起伏变化
width: 10,
clampToGround: true,
},
});
var bbox = turf.bbox(geoData.features[0]);
map.camera.flyTo({
destination: Cesium.Cartesian3.fromDegrees(Number(bbox[0]), Number(bbox[1]), 10000.0),
});
};
效果图: