FlyTo Path doesn't work

I’m trying to get the viewer to flyTo a Path entity and it doesn’t seem to work. Flying to a Polyline works just fine. I made a sandcastle example here to show the problem:

Click the “Fly to Path” and nothing happens.

Click the “Fly to Polyline” and it flies to the polyline as expected.

Does anyone know how to fly to a Path or is this a bug?



I found the same issue about a year ago (search for “viewer.flyTo( PathGraphics entity ) does not work?”).

We were able to work around it, but I forgot the details.

Regards, Willem

Hi Andrew and Willem,

Fly to does not work with paths by design. In almost all use cases (except for yours, which we’ve noted!), users want to track the entity’s position, not zoom to the path defined by its movement. Also in many cases the path is constantly changing, which may lead to inaccurate results.

If you’re working with static data, it’s a much better idea to create a polyline than to create a path.

All that being said, we’re always looking to improve our API, so I’ve created a issue for this that hopefully the team will be able to look into once we’ve got some things off our plate. :slight_smile:


  • Rachel


Thanks for creating the issue. I’ve actually switched from using Polyline’s to Paths due to performance. Paths seems to perform better than polylines when you have hundreds/thousands of them created (showing or not). I’d happily switch back to polylines if performance was better. If you have any examples that show using many polylines and being able to control the width of the polylines (which seems to throw out primitives…), I’d love to see.



Hi Andrew,

Optimizations will depend on your specific use case (as is so often how it works with big data optimization!), however you may find these two threads helpful:!searchin/cesium-dev/polyline|sort:date/cesium-dev/mgLw8RcJS4I/yYk_0qVICwAJ!topic/cesium-dev/qdsJeBZET8c

Hope that helps,

  • Rachel