Unaligned polygon and polyline

Hello,

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

I’m drawing a polygon and around it a polyline. Both of them have the same points and the polyline has the first point on the first and the last position to surround the polygon. The issue’s that when I zoom in the polyline get inside or outside of the polygon depending on the position of the pointer. This means that if I start the zoom inside of the polyline separate itself of the polygon and if I start to zoom in out of the polygon the polyline will draw itself on top of the polygon. I tried adding more points because I thought it will help maintain the line consistency but it did not work. Please see the attached images. Is it a points issue? Frustum Issue or Camera/Scene issue? I know this could be tricky, especially because I’m using an old Cesium version, so I only need an idea, where to start to solve it as or what could the component that’s causing this behaviour…

Thank you in advance.

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

var polygon = viewer.entities.add({

polygon : {

hierarchy : Cesium.Cartesian3.fromDegreesArray([-119.0, 30.0,

-105.0, 30.0,

-105.0, 40.0,

-119.0, 40.0]),

material : Cesium.Color.RED

},

polyline: {

positions : Cesium.Cartesian3.fromDegreesArray([-119.0, 30.0,

-105.0, 30.0,

-105.0, 40.0,

-119.0, 40.0,

-119.0, 30.0]),

width : 5,

material : Cesium.Color.BLACK

}

});

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

The only reason it’s because I have special features and properties (Like dash line, dotted and so on) on the Polyline and I need to have them available on the outer line of the Polygon. That’s the reason I can’t use the simple (solid) Polygon.outLine property.

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

All browsers and Cesium 1.33.