PolylineGeometry 2D rendering incorrectly at certain zoom levels

1. A concise explanation of the problem you're experiencing.

While in 2D polylineGeometry are not being rendered correctly at certain zoom levels. Occassionally the graphic appears to extend down towards the lower left corner of screen. In 3D it appears to render properly.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

Once the globe appears click on the 2D (scene picker) button and zoom in/out slowly. At some zoom levels you will see the line exten down to the lower left corner of the screen.

var geomInst = null;
var linePoints = null;
var primitive = null;
var sceneModePicker = null;
var viewer = null;

viewer = new Cesium.CesiumWidget('cesiumContainer');
sceneModePicker = new Cesium.SceneModePicker('sceneButton', viewer.scene, 0);

linePoints = [-71.19881, 41.6785, 0,
              -71.19994, 41.46332, 0,
              -71.11713, 41.49306, 0,
              -71.14121, 41.65527, 127,
              -71.19881, 41.6785, 0];

geomInst = new Cesium.GeometryInstance({
    geometry: new Cesium.PolylineGeometry({
        positions: Cesium.Cartesian3.fromDegreesArrayHeights(linePoints),
        width: 1.0,
        vertexFormat: Cesium.PolylineColorAppearance.VERTEX_FORMAT,
    attributes: {
        color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED)

primitive = new Cesium.Primitive({
    geometryInstances: geomInst,
    interleave : true,
    appearance: new Cesium.PolylineColorAppearance()


3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

The only thing that is a little different is that I am using the Cesium Widget and the Geometry API. I am using the widget for performance reasons I only need to deal with a large set of Geometries.

4. The Cesium version you're using, your operating system and browser.

Cesium version 35, Windows 7, Chrome 59.0.3071.115

Thanks in advance

Jerrold Stoy

I have an image which may help. Does anybody know how to attach one?

Not sure if this helps or not, but it seems to be happening only when the Z component of of a Cartesian3 is eqal to 0.

Hi Jerrold,

I replied on the issue you opened in GitHub: https://github.com/AnalyticalGraphicsInc/cesium/issues/5726

I plugged your code into sandcastle and could not replicate the behavior I see in the images. Could this perhaps be a problem with your graphics card?