I have not been able to replicate the issue in Sandcastle. I put the following example together, but as I stated it does not exhibit the problem. This makes me wonder if my globe/elevation settings are somehow coming into play. I could have just added one ellipsoid entity (and I did initially), but in order to eliminate as many variables as possible I tried replicating my code in the Sandcastle example as closely as I could. The ellipsoid radii and material along with the label text are updated via callback properties in my code. But when I eliminate the callback properties and simply set a value as in this example I still am getting the same position moving issue.
Any ideas as to why these ellipsoids would appear to move when I tilt the globe?
Thanks,
Rob
Sandcastle example:
var viewer = new Cesium.Viewer('cesiumContainer');
var lstNMS = [];
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.71386, 39.91342, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.71449, 39.94071, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.69054, 39.97209, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.52659, 39.88391, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.52661, 39.86758, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.62164, 39.79782, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.66348, 39.75366, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.75777, 39.84132, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.75127, 39.93749, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.79585, 39.95961, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.83249, 39.97904, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.94630, 39.94179, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.93377, 39.92068, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.96673, 39.91066, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.93136, 39.90431, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.94985, 39.88058, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.94443, 39.86318, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.95437, 39.83997, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.91327, 39.83498, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.91656, 39.80739, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.83585, 39.75997, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.83780, 39.71838, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.80171, 39.71663, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.75819, 39.74609, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.63775, 39.92862, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.74136, 39.91173, 0));
lstNMS.push(Cesium.Cartesian3.fromDegrees(-104.80629, 39.99073, 0));
var lstEllipsoids = [];
for (var i=0; i<lstNMS.length; i++) {
var pos = lstNMS[i];
var newEllipsoid = viewer.entities.add({
id: 'id'+i,
name : 'e'+i,
position: pos,
show: false,
ellipsoid : {
radii : new Cesium.Cartesian3(500.0, 500.0, 1),
material : Cesium.Color.YELLOW
},
label: {
text: '67',
font: '100 72px sans-serif',
fillColor: Cesium.Color.BLACK,
outlineColor: Cesium.Color.BLACK,
outlineWidth: 1.0,
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
scale: 0.2,
eyeOffset: new Cesium.Cartesian3(0.0, 0.0, -200.0)
}
});
lstEllipsoids.push(newEllipsoid);
}
for (var j=0; j<lstEllipsoids.length; j++) {
lstEllipsoids[j].show = true;
}
viewer.zoomTo(viewer.entities);
var newCurtainSeg = cesiumViewer.entities.add({
id: this.TrackId,
wall: {
positions: new Cesium.CallbackProperty(this.updateCurtainPositions(this), false),
material: new Cesium.ColorMaterialProperty(new Cesium.CallbackProperty(this.updateCurtainColor(this), false))
}
}); terrainProvider: new Cesium.CesiumTerrainProvider({
url: 'https://assets.agi.com/stk-terrain/world',
requestVertexNormals : true
}),--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Cartesian3 positions which define the top of the wall." and the minimumHeights property as "A Property specifying an array of heights to be used for the bottom of the wall instead of the globe surface." I have been specifying the height in the position for the walls as meters above sea level. This seems to be correct as the height ends up matching the aircraft model height and the height of the other lines I display related to the aircraft.var newObject = cesiumViewer.entities.add({
id: nm.id,
position: Cesium.Cartesian3.fromDegrees(nm.pos.LON, nm.pos.LAT),
// position: Cesium.Cartesian3.fromDegrees(nm.pos.LON, nm.pos.LAT, nm.pos.ALT),
show: false,
ellipsoid: {
radii: new Cesium.CallbackProperty(nm.updateMonitorSize_Ellipsoid(nm), false),
material: new Cesium.ColorMaterialProperty(new Cesium.CallbackProperty(nm.updateMonitorColor(nm), false))
},
label: {
text: new Cesium.CallbackProperty(nm.updateMonitorValue(nm), false),
font: '100 72px sans-serif',
fillColor: Cesium.Color.BLACK,
// style: Cesium.LabelStyle.FILL,
outlineColor: Cesium.Color.BLACK,
outlineWidth: 1.0,
style: Cesium.LabelStyle.FILL_AND_OUTLINE,
scale: new Cesium.CallbackProperty(nm.updateLabelScale(nm), false),
eyeOffset: new Cesium.Cartesian3(0.0, 0.0, -200.0)
}
});