A Problem with Polyline When globe: false

I have verified a different behavior between polylines and other entities, when setting globe to false and using a CallbackProperty function. Specifically, when I am setting globe to false, without using a CallbackProperty function in polyline positions property, everything works fine. However, when I am setting globe to false, while using a CallbackProperty function in polyline positions property, Cesium throws a rendering error. Note, that this error does not occur with other entities such as point or rectangle.

Following a previous post, I provide a sandcastle example for verification purposes. As you may see, point and rectangle entities accept a CallbackProperty function when globe is being set to false without any error.

I think that all entities should have had a consistent behavior with respect to the CallbackProperty function when globe is false.

Best,
Nikos

You’re right that this is a bug, however I will point out that even after the code in Cesium is fixed, your example may still crash because you are setting followSurface : true on your polyline. Obviously, if there is no surface then you cannot configure a polyline to follow it.

(in the current code, the globe’s ellipsoid is obtained too early)

var labels = viewer.scene.primitives.add(new Cesium.BillboardCollection());
labels.add({
//position : Cesium.Cartesian3.fromDegrees(west, (north + south) / 2, 0),
position : new Cesium.CallbackProperty(function() {
return Cesium.Cartesian3.fromDegrees(west, (north + south) / 2, 0);
}, false),
image : Cesium.writeTextToCanvas( “Point” , { font: ‘24px Times New Roman’ }),
});

``

Thanks for your prompt response. In my previous sample code I just tried to isolate the bug.

Another relevant issue I have is with text labels. I add labels as in the following sample:

However, when using the CallbackProperty function, the label is not added at all (independently if globe is on or off). Please check here for a sandcastle sample.

Is there any other way to add text labels that are shown when globe is on or off?

Thanks,
Nikos

Τη Πέμπτη, 23 Μαρτίου 2017 - 5:27:50 μ.μ. UTC+2, ο χρήστης Scott Hunter έγραψε:

Hey, you might want to checkout our Sandcastle labels example. It should give you a good idea how to use all the label features. It also looks like you’re using a mixture of the primitive and entity APIs (only entities have the Cesium.CallbackProperty. You can’t use it with a BillboardCollection since those are primitives).

  • Rachel

Dear Rachel,

thank you for pointing me out the Sandcastle labels examples. Of course I am aware of all these which are quite useful.

I am forced to set globe to off, due to the globe transparency I need. I would have been very happy if I could use entity label with globe off, but in a previous question I had, I got that solution for labels.

So, lets go one step back and not set globe to off. If I will remove the globe background with viewer.scene.imageryLayers.removeAll() the following problems/bugs appear:

  1. The alpha color parameter of the viewer.scene.globe.baseColor object has not any visual effect and the globe transparency is not changed.
  2. The inner part of the ellipsoid is not fully transparent even if one set viewer.scene.globe.show = false. For example, a small sphere at the earth center is not visible.
    Both of the above problems are demonstrated in this sandcastle example. Note that this issue has been also reported here about 1 year ago, but not fixed yet.

Please let me know If there is another way to achieve the Earth globe (semi)transparency. Then, I will avoid setting globe to off, and all its negative consequences.

Thanks,
Nikos

Τη Παρασκευή, 24 Μαρτίου 2017 - 8:15:27 μ.μ. UTC+2, ο χρήστης Rachel Hwang έγραψε:

Hi Nikos,

We’ve opened a new issue for this bug here: https://github.com/AnalyticalGraphicsInc/cesium/issues/5146. We’ve linked to your forum request so that we can update you when we address it.

Meanwhile, unfortunately I don’t know of another way to achieve globe transparency.

Best,

  • Rachel

Dear Rachel,

thank you for the update!

With respect to the two other issues mentioned in my last post, do I have to open as new issues in the forum? It is obvious that both are bugs that should be fixed.

Best regards,
Nikos

Τη Δευτέρα, 27 Μαρτίου 2017 - 8:55:38 μ.μ. UTC+3, ο χρήστης Rachel Hwang έγραψε:

Hi Nikos,

Thanks for reporting the globe alpha issue! I’ve opened a new issue for it here: https://github.com/AnalyticalGraphicsInc/cesium/issues/5163

I linked to this forum post so that we can notify you if we make any progress on it.

As for the globe.show = false issue, this is actually by design. Right now Cesium does not support rendering anything beneath the surface of the ellipsoid. We’ve had a lot of interest in such a feature, so it’s definitely something we plan to work on, but unfortunately I’m not sure what the timeline for that is like yet.

Meanwhile, I hope you’re able to find another solution!

Best,

  • Rachel

Great!

Thanks,
Nikos