Seeking latitude line solution/help, slow performance using clampToGround with polylines

I am new to Cesium and am looking for a solution to creating parallels (lines of latitude), and eventually longitudes as well. I am using polylines to create the latitude lines. Relevant code looks like this:

    for (var latLineSecs of newLatArr) {
      var latLineId = "latLine_" + latLineSecs
      latPositions = getLatitudeLinePositions(secondsToDecimalDegrees(latLineSecs))
      latLine = new Cesium.Entity({
        name: 'latLine',
        id: latLineId,
        show: true,
        polyline: {
          loop: true,
          arcType: Cesium.ArcType.None,
          width: that.get('width'),
          material: that.get('color'),
          positions: latPositions,
          clampToGround: true,

When calling this function to create 10 degree increment latitude lines over the whole globe surface (so total of 19 latitude lines circling the globe), it takes upwards of 8 seconds to complete/render (not nice), when using clampToGround.

When setting clampToGround to false, it completes/renders in less than a second (nice).

The reason for attempting to use clampToGround is to avoid the paralax movement of the polylines against the globe surface (as apparently the polylines do have some default height… I assume). i.e. The lines appear to change positions on the globe, when not using clampToGround.

Thanks for any help, thoughts,

Hi. Look it Sandcastle Example Par and Mer

Thanks for the reply, and I have seen and looked at the Parallel and Meridian example on Sandcastle. However, that example exhibits the same parallax issue: lat/long lines moving against the terrain as you move/pan the camera when zoomed down below about10km camera height.

The only option I have found to get rid of the parallax is to use clampToGround for the polylines, but that kills performance when trying to render full globe circumference latitude lines. So much so, that using clampToGround for the polyline latitude lines really does not appear to be an option.

Hoping there is a solution I cannot seem to find for creating latitude lines that are both rendered efficiently, and also do NOT exhibit the parallax issue.

Thanks again,

Wow, I never realized just how bad these can get:


Plus, notice how in the second shot the line is obscured by “terrain” even though no terrain service is being used. It would be helpful if “clamp to terrain” polylines only applied clamping to the points that are in the current viewport, which I don’t think is currently the case. (The screenshots are of primitives.primeMeridian from the linked Sandcastle.)