Create a circle on an entity

Hi,

I am creating the following entity:

var randomColor = Cesium.Color.fromRandom({alpha: 0.8});

var plane= Cesium.entities.add({

position: new Cesium.Cartesian3.fromDegrees(parseFloat(planePosition.x), parseFloat(planePosition.y), parseFloat(planePosition.z)),

id: planeName,

billboard: {

name: planeName,

scale: 0.9,

image: icon,

rotation: Cesium.Math.toRadians(parseFloat(angle)),

},

polyline: {

positions: [new Cesium.Cartesian3.fromDegrees(parseFloat(planePosition.x), parseFloat(planePosition.y), parseFloat(planePosition.z)),

new Cesium.Cartesian3.fromDegrees(parseFloat(center.x), parseFloat(center.y), parseFloat(center.z))],

width: 3.5,

material: randomColor

}

});

The coordinates/angle values (center, planePosition, angle) I receive from AJAX communication.

I need to add a circle of the orbit that the plane is doing.

  1. Can I add it as a part of the same entity?

  2. How do I create a circle, with no fill, just outline?

Many tests using the sandcastle did not work.

Thanks.

Hi there,

Checkout this example, which sounds similar to your case: http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Interpolation.html&label=Showcases

Entity.path sounds like what you need.

Hope that helps,

  • Rachel

Rachel,

Thanks a lot this is exactly what I needed.

Kfir.