I'm trying to draw polyline with CZML.
The problem is each time I call to .process(czml) the polyline is flickring.
Example that can be paste into SandCastle:
var czml = [
{
"id": "document",
"name": "Lotem",
"version": "1.0"
},
{ "id": "target1", "name": "Target1", "position": { "cartographicDegrees": [ "34.80555277777778", "31.930744444444446", 0 ] }, "billboard": { "image": "../images/Cesium_Logo_overlay.png", "scale": 2, "scaleByDistance": { "nearFarScalar": [ 50, 0.3, 3000000, 0.1 ] } } },
{ "id": "target2", "name": "Target2", "position": { "cartographicDegrees": [ "34.8042", "31.916341666666668", 0 ] }, "billboard": { "image": "../images/Cesium_Logo_overlay.png", "scale": 2, "scaleByDistance": { "nearFarScalar": [ 50, 0.3, 3000000, 0.1 ] } } },
{ "id": "target3", "name": "Target3", "position": { "cartographicDegrees": [ "34.77899166666666", "31.93821666666667", 0 ] }, "billboard": { "image": "../images/Cesium_Logo_overlay.png", "scale": 2, "scaleByDistance": { "nearFarScalar": [ 50, 0.3, 3000000, 0.1 ] } } },
{ "id": "MyLocationIcon", "name": "mylocationIcon", "position": { "cartographicDegrees": [ 34.8, 32, 0 ] }, "billboard": { "image":"../images/Cesium_Logo_overlay.png", "show": true, "rotation": -3.490658503988659, "scale": 1, "scaleByDistance": { "nearFarScalar": [ 50, 0.3, 3000000, 0.1 ] } }, "label": { "fillColor": { "rgba": [ 0, 255, 255, 255 ] }, "font": "10pt Lucida Console Bold", "horizontalOrigin": "CENTER", "pixelOffset": { "cartesian2": [ 0, 25 ] }, "style": "FILL", "text": "32:00:00.0N 034:47:59.99E", "showBackground": true, "backgroundColor": { "rgba": [ 0, 0, 0, 255 ] } } },
{ "id": "fov", "name": "fov", "polyline": { "positions": { "cartographicDegrees": [ 34.7823714091016, 31.94390021959676, 0, 34.8, 32, 0, 34.77121369541926, 31.94736065952137, 0 ] }, "material": { "solidColor": { "color": { "rgba": [ 0, 255, 255, 255 ] } } }, "width": 2, "clampToGround": true, "show": true }
}];
var viewer = new Cesium.Viewer('cesiumContainer');
var rectangle = Cesium.Rectangle.fromDegrees(34.0, 31.5, 34.5, 33.0);
viewer.camera.flyTo({
destination : rectangle
});
var czmlStream = new Cesium.CzmlDataSource();
viewer.dataSources.add(czmlStream);
setInterval(function(){ czmlStream.process(czml); }, 100);
Thanks, Eitan