Been playing around with Cesium.GeoJsonDataSource
and whlie that part is working great, I’m running into all kinds of issues when adding Entities to the map - specifically the images.
An example enttity looks like this:
const SampleEntities = new Cesium.Entity({
position: Cesium.Cartesian3.fromDegrees(15.47994, 47.01825),
billboard: new Cesium.BillboardGraphics({
image: '/map-pin.svg',
width: 32,
height: 32,
scaleByDistance: new Cesium.NearFarScalar(1.5e2, 2.0, 1.5e7, 0.4),
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
disableDepthTestDistance: Number.POSITIVE_INFINITY,
}),
When I leave it like this, it will show the image properly but when I rotate the map I can still see it ‘behind’ the globe. If I comment out disableDepthTestDistance
it no longer does that, but I get clipping issues.
I’ve seen suggestions for disabling globe.depthTestAgainstTerrain = true;
but setting that true
or false
hasn’t done anything.
Note: If I disable the GeoJSON import and run the globe normally the clipping issue does not occur, so its seems to be tied with GeoJSON. I’ve tried a number of different GeoJSON files, but they all do the same thing.