You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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));
};
var positions = [lonLatToCartesian(-44, -5,0), lonLatToCartesian(-100,-1,0), lonLatToCartesian(70,0,0),lonLatToCartesian(-44, -5,0)];
var polygon = new Cesium.Polygon();
polygon.setPositions(positions);
primitives.add(polygon);
if I change the point (70,0,0) to (60,0,0), it works.
From the forum:
https://groups.google.com/forum/?fromgroups=#!topic/cesium-dev/xRqn3PQRrvQ
This is most likely because polygon triangulation happens on a tangent plane. At the least, we should try for a better error message.
The text was updated successfully, but these errors were encountered: