1. A concise explanation of the problem you’re experiencing.
Noob Question : Please forgive my mistakes
I am attempting to add a straight polyline as an entity . The polyline is dynamic, meaning it takes coordinates from two other dynamic entities. I need to see the line as a straight one (even cutting through the earth) . I think I am doing something wrong here , as never mind what , the line keeps following earth’s curvature. it is beutiful , but not what I need
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
function getPositions()
{
//Getting the _value is a bug discovered which is not documented
//the .position property is said to be of Cartesian3 in the docs
//However , it is not. The _value is the cartesian val
//entArray [] is an array of : viewer.entities.add(....
var pos1 = entArray[0].position._value;
var pos2 = entArray[5].position._value;
return [pos1,pos2];
}
entArray[entArray.length] = viewer.entities.add({
polyline:{
followSurface: false, //Doesn't work
width: 2, //Works great
positions: new Cesium.CallbackProperty(getPositions,false), //works great
material: new Cesium.ColorMaterialProperty(Cesium.Color.RED) //works great
}
});
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I need to draw a straight line of sight between two moving objects
4. The Cesium version you’re using, your operating system and browser.
using version 1.65 , Windows 10 64 bits with Chrome64 Version 77.0.3865.90 (Official Build) (64-bit)