I’m currently looking into applying a lat/long grid on the terrain and have it centered on the current view center point. The grid will maintain lat long alignment while the map is moved, zoomed or tilted and will also be sized based on the canvas width/height.
Not sure what would be the best approach for having a smooth experience, so I am looking for what can be achieved at the moment. So far, with my approach, I can’t seem to eliminate the flickering.
Here is a Sandcastle with my efforts so far. If there are alternate ways of doing this in a simpler way, I would really appreciate the input. Thanks.
From the code you shared it seems like the performance lag and flickering results from needing to recalculate your grid location each time after the camera.changed event fires. If performance is a higher priority you could consider something static like a fixed grid as is this example Cesium Sandcastle
Hope that us helpful and please let us know if you have more questions about this issue.
Best,
Luke
I think that the flickering is caused by re-creating the (low-levell) primitive objects each time. Maybe using entities with callback properties could be an option here:
Beyond that: Trying to compute … something … in a view/screen/canvas-dependent fashion can always be tricky. You can zoom out until the globe is nothing more than a Pale Blue Dot, and then, every computation that tries to map view/screen-space to earth will find some limits. But with some assumptions, painting such a screen-space-fixed grid may be possible.