Transparent Base Layer?

623 views
Skip to first unread message

skaug...@gmail.com

unread,
Dec 10, 2013, 10:25:08 AM12/10/13
to cesiu...@googlegroups.com
I recently started using Cesium for a project at work. I need a map that has a completely transparent background. I figured out that I can can remove the base layer after I create the Cesium Viewer, but when I do that I just get a blue base layer instead of transparent. Is there a way to change the color, so that it is transparent?

Kevin Ring

unread,
Dec 11, 2013, 2:07:47 PM12/11/13
to cesiu...@googlegroups.com
I'm not completely clear what you're trying to do.  Are you trying to just show a map in a small area, and have the rest of the globe disappear?

Kevin


On Tue, Dec 10, 2013 at 10:25 AM, <skaug...@gmail.com> wrote:
I recently started using Cesium for a project at work. I need a map that has a completely transparent background. I figured out that I can can remove the base layer after I create the Cesium Viewer, but when I do that I just get a blue base layer instead of transparent. Is there a way to change the color, so that it is transparent?

--
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/groups/opt_out.

skaug...@gmail.com

unread,
Dec 11, 2013, 5:39:09 PM12/11/13
to cesiu...@googlegroups.com
Our map will have primitives (polylines, billboards, etc.). I want all of those visible, but have a 2.5D globe that has no ImageryLayers. I want it to be transparent so this map can be overlayed on something else and you can see through it, but if I remove all the imagery layers after creating the Cesium Viewer I'm left with a blue globe, instead of a transparent globe.

Is there some way to make a globe with no imagery layers transparent?

Thanks,
Scott

Kevin Ring

unread,
Dec 11, 2013, 5:42:37 PM12/11/13
to cesiu...@googlegroups.com
Scott,

You lost me at "have a 2.5D globe that has no ImageryLayers".  Since the imagery layers are the only thing (other than the blue) that is drawn on the surface, what does it mean to have a globe without any imagery layers?

Perhaps you mean that you want to see your polylines and such, but you don't want to see a surface at all?  If that's what you're after, you can just set:

scene.centralBody.show = false;

And the surface will not be drawn, but other primitives still will.

Kevin

Kevin Ring

unread,
Dec 11, 2013, 5:44:59 PM12/11/13
to cesiu...@googlegroups.com
Sorry, that should be:

widget.centralBody.show = false;


skaug...@gmail.com

unread,
Dec 12, 2013, 11:14:55 AM12/12/13
to cesiu...@googlegroups.com
Aha! Perfect, that's what I was looking for.

Thanks,
Scott

Gergely Padányi-Gulyás

unread,
Jan 14, 2016, 7:12:43 AM1/14/16
to cesium-dev, skaug...@gmail.com
I guess now it is something like this:

viewer.scene.globe.show = false;
Reply all
Reply to author
Forward
0 new messages