Large polygons error

Hi!

When I draw polygons with large distance between points, Cesium throws this error:

“Uncaught DeveloperError: At least three positions are required.”

or

“Uncaught TypeError: Cannot call method ‘subtract’ of undefined.”

My code:

var lonLatToCartesian = function(x, y, z) {

return ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(x, y, z));

};

Hi Tamy,

I took a quick look at this in the debugger, and I believe it is because we do polygon triangulation on a tangent plane, and the tangent plane becomes hard to compute for large polygons like this. We’re not able to do anything about this in the short-term (contributions welcome, of course), but I submitted an issue so we can consider it later - #620. In the meantime, adding more points along the boundary may help.

Patrick