I am kinda new to cesium and I get more and more impressed. The biggest drawback right now is the lack of tutorials and samples. I think the sandcastle stuff is great, but the learning curve is still uphill. But great work to you guys doing cesium.
I am trying to put a small sample together that shows a track of data that comes from a car mapping system.
I figured out how I could use the API to add all the points as a poly line:
primitives.add(new Cesium.Primitive({
geometryInstances: new Cesium.GeometryInstance({
geometry: new Cesium.SimplePolylineGeometry({
positions: positions,
followSurface: true
}),
attributes: {
color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.WHITE)
}
}),
appearance: new Cesium.PerInstanceColorAppearance({
flat: true,
renderState: {
depthTest: {
enabled: true
},
lineWidth: Math.min(2.0, scene.maximumAliasedLineWidth)
}
})
}));
``
But to me this seems abit clumbersum for showing a poly line.
What is the general advice if I was to do this again. Use the api or just construct czml on the fly and add that to cesium ?
I noticed that if I had a terrain provider added, the poly line was moving around as i changed the view. Guessing that the poly line is not actually laying ontop of the terrain. Is followSurface not working or is that intended for something else.
Last, since I for each position in the linestring also have a timestamp, i would like to visualize the current position ontop of the linestring with a field of view indication, but I cant figure out how I start using teh timeline features together with above. (I seen some examples with czml and wonder if that is an easier way to go).