Geographic Information Systems Asked by Tarlan Mammadzada on March 30, 2021
I’ve added an entity:
var debris = cesiumViewer.entities.add({
position : {
value : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883, 1000) ,
referenceFrame : Cesium.ReferenceFrame.FIXED
},
point : {
color : Cesium.Color.YELLOW,
pixelSize : 6
}
});
The point is shown in 2D and Columbus mode, but hidden in 3D mode. Also, in Columbus mode it looks like the altitude iz 0.
Added also cesiumViewer.scene.globe.depthTestAgainstTerrain = true;
Where is the issue?
var debris = cesiumViewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883, 1000) ,
point : {
color : Cesium.Color.YELLOW,
pixelSize : 6
}
});
Answered by baloola on March 30, 2021
You don't need to specify ReferenceFrame.FIXED
, as that's the default. Try this:
var debris = cesiumViewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883, 1000),
point : {
color : Cesium.Color.YELLOW,
pixelSize : 6
}
});
If you really do need to specify a reference frame, you can construct that like this:
var debris = cesiumViewer.entities.add({
position : new Cesium.ConstantPositionProperty(
Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883, 1000),
Cesium.ReferenceFrame.FIXED
),
point : {
color : Cesium.Color.YELLOW,
pixelSize : 6
}
});
Answered by emackey on March 30, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP