How is the PathGraphics connected with the position property to draw the path?

My solution right now loads a cars gps track using czml where the goal was to show something here at the office. I am now digging down into the source code to better understand cesium.

What started this was that I used the examples given in visalizing spatial data post of drillPickEntities and pickEntity, then it didnt return any thing for clicking on the path.

My assumption is that the path itself is not an entity and thats why its not returned, so it will only return the entity if I clicked the actually position (shown by the vehicle image).

I think the quick solution is to change drillPickEntities to return other primitive stuff and not just a entity.

So back to learning, I started looking down at czmlDataSource and then I see in


that a PathGraphics is created for the path property. then going to


i cannot see how this end up with a Path on the screen. How is the PathGraphics connected with the position property to get all the points that it need to draw the path?

I ask because I would like to do something similar as a path property in czml, but instead of drawing a path i want to draw small billboards for each point in the position vector. As I am learning, feel free to shoot at the idea if its bad :slight_smile:

We do not use czml, but in our project clicking on a line (PathGraphics) works fine.
In our case the entity position is a SampledPositionProperty() that gets updated with new positions, we have a LEFT_CLICK handler that uses

var pickedObject = scene.pick(click.position);

if (Cesium.defined(pickedObject)) {

var obj = Cesium.defaultValue(,;

if (viewer.entities.contains(obj)) {

to get the entity.

Thanks. Will give it a try and post back when i know if it worked.