1. A concise explanation of the problem you're experiencing.
I've just updated the version of cesium that our web app uses from 1.45 to 1.49. I have some code that draws circles, etc on 3D tile sets that have been generated with context capture. Now the circles don't draw correctly on models and only appear to draw on the ground/base imagery layer.
2. A minimal code example. The co-ordinates are being grabbed from a click event and are drawn in the right place. However they're under the 3D tiles on the base imagery layer instead of on the 3D tiles.
function drawCircle(lat, lon, height) {
let radius = prompt("Specify the radius of the circle in metres.", "3");
let color = Cesium.Color.RED.withAlpha(0.5);
return viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(lon, lat, height),
ellipse: {
semiMinorAxis: radius,
semiMajorAxis: radius,
material: color
}
});
}
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
To draw annotations etc on models.
4. The Cesium version you're using, your operating system and browser.
Cesium 1.45 works as expected and Cesium 1.49 has this weird behaviour. I've tried every Cesium version in between and the issues starts happening in 1.46 onwards. I'm using Linux (Ubuntu 18.04) with Chromium 69.0.3497.81.