1.叠加entity
var pointArray = data.geometry.coordinates[0][0];
var pointArray2 = [];
for (var j = 0; j < pointArray.length; j++) {
pointArray2.push(pointArray[j][0]);
pointArray2.push(pointArray[j][1]);
}
let entity = new Cesium.Entity({
polygon: {
hierarchy: {
positions: Cesium.Cartesian3.fromDegreesArray(pointArray2),
},
material: Cesium.Color.RED,
extrudedHeight: 10,
outline: true,
outlineColor: Cesium.Color.WHITE,
outlineWidth: 2,
},
});
let entitys = Viewer.entities.add(entity);
2.定位方式
##定位飞过去
Viewer.flyTo(entitys) //飞行模式
##直接定为过去 不飞
Viewer.zoomTo(entitys)