--
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+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
scene.globe.depthTestingAgainstTerrain = true;--
Hannah,
Thanks, this works.
var center = Cesium.BoundingSphere.fromPoints(entity.polygon.hierarchy.getValue().positions).center;
Regards
Ian
One of our guys is trying to resolve this 'label under polygon' issue and we're on Cesium 1.28. Any updated ways of dealing with this?
The problem I’m running into is that labels at first appear on top of the polygon, but go behind it when the user zooms out. I draw the label with z_value = (shape_z_value) + constant, which should always be on top.
I’ve tried modifying the label.eyeOffset, but it isn’t acceptable to my users for the label to go behind the camera (and thus off the screen) when they zoom in to a particular zoom level.
I should also mention that I’m using the Primitives API, not the Entity API, so Labels aren’t associated with a shape, necessarily. var kml_data = Cesium.KmlDataSource.load(url)
kml_data.then(function(data) {
viewer.dataSources.add(data);
// Iterate over all the KML entities
$.each(data.entities.values, function(i, entity) {
var poly_center = Cesium.BoundingSphere.fromPoints(entity.polygon.hierarchy.getValue().positions).center;
poly_center = Cesium.Ellipsoid.WGS84.scaleToGeodeticSurface(poly_center);
entity.position = poly_center;
});
}