--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi.
1) How would you update the entity once it is created?
2) My data arrives in one big bulk on startup and then smaller updates once per second or so (I simulate them as interval here). Any suggestion here?
Thanks
--
var viewer = new Cesium.Viewer('cesiumContainer');
var date = new Date();
var jDate = new Cesium.JulianDate.fromDate(date);var nextJDate = new Cesium.JulianDate.fromDate(new Date(date.getTime() + 5*1000));
//Create a color sampled propertyvar colorProperty = new Cesium.SampledProperty(Cesium.Color);colorProperty.forwardExtrapolationType = Cesium.ExtrapolationType.HOLD;
//Populate it with datacolorProperty.addSample(jDate, new Cesium.Color(0, 0, 0));colorProperty.addSample(nextJDate, new Cesium.Color(1, 1, 1));
// create a position Cartesian3 propertyvar positionProperty = new Cesium.SampledProperty(Cesium.Cartesian3);positionProperty.forwardExtrapolationType = Cesium.ExtrapolationType.HOLD;//Populate it with datafor (var i = 0; i<6; i++){ nextJDate = new Cesium.JulianDate.fromDate(new Date(date.getTime()+i*1000)); positionProperty.addSample(nextJDate , new Cesium.Cartesian3.fromDegrees(-103.0+i, 40.0-i));}
var redEllipse = viewer.entities.add({ position: positionProperty, name : 'Red ellipse on surface with outline', ellipse : { semiMinorAxis : 250000.0, semiMajorAxis : 400000.0, material : Cesium.Color.RED.withAlpha(0.5), outline : true, outlineColor : colorProperty }});