Hi
I am trying to upgrade from 1.13 to 1.15 but when I do so, I receive the following error:
An error occurred while rendering. Rendering has stopped.
undefined
RangeError: Invalid array length
RangeError: Invalid array length
at updateFrustums (http://eventrac.local/js/cesium-1.15/Cesium.js:150100:36)
at createPotentiallyVisibleSet (http://eventrac.local/js/cesium-1.15/Cesium.js:150257:13)
at render (http://eventrac.local/js/cesium-1.15/Cesium.js:150848:9)
at Scene.render (http://eventrac.local/js/cesium-1.15/Cesium.js:150889:13)
at CesiumWidget.render (http://eventrac.local/js/cesium-1.15/Cesium.js:160015:25)
at render (http://eventrac.local/js/cesium-1.15/Cesium.js:159428:32)
I have identified the problem with the position when adding an entity
entity = viewer.entities.add({
//Set the entity availability to the same interval as the simulation time.
availability: new Cesium.TimeIntervalCollection([new Cesium.TimeInterval({
start: start,
stop: stop
})]),
//Use our computed positions
position: position, <— THIS IS THE PROBLEM
//Automatically compute orientation based on position movement.
orientation: new Cesium.VelocityOrientationProperty(position),
//Load the Cesium plane model to represent the entity
This is how i am building the position
var property = new Cesium.SampledPositionProperty();
var i = 0;
var positions = ;
$.each(data.points, function(key, value) {
positions.push(Cesium.Cartographic.fromDegrees(value[1], value[0]));
});
var promise = Cesium.sampleTerrain(terrainProvider, 11, positions);
Cesium.when(promise, function(updatedPositions) {
$.each(updatedPositions, function(key, value) {
value.height += 13;
var time = Cesium.JulianDate.addSeconds(start, i, new Cesium.JulianDate());
var position = Cesium.Ellipsoid.WGS84.cartographicToCartesian(value);
i++;
property.addSample(time, position);
});
plot(property, i);
});
This worked fine in 1.13. but not in 1.15 I am unsure as to where I am going wrong.
Any help would be appreciated.
Thanks
Aaron