2D maps + thousands of polylines - how to draw them fast?

Hello everyone! :slight_smile:

I am trying to implement an interactive map on top on Cesium; the intended use is showing results of a real-time simulation of citizens moving in a transport network of a large city. It is basically a simple 2d map, covered with lots of polylines, showing the recorded motions of each citizen, each highlightable by mouse; upon click, a detailed information appears.

It was pretty easy to write the drawing code (a really good API you have), and it works nicely if the number of tracks is small (say 250 tracks, each consisting of 3-10 lines). However, for our project I would need to show tens of thousands of these. When I try to just add them all as polylines, the rendering becomes unbearably slow (still works though).

Please, give me some pointers on how to optimize the rendering?

Thanks a lot in advance,

Jiri

Hi Jiri,

If the polylines are static, try batching together polyline geometries into one or a few primitives: http://cesiumjs.org/2013/11/04/Geometry-and-Appearances/

If the polylines are dynamic, try a search on this forum for strategies that folks have used in the past.

Patrick