Basic Question - Removing Columbus View from scene selection

131 views
Skip to first unread message

john.p...@gmail.com

unread,
Jul 15, 2019, 12:19:03 PM7/15/19
to cesium-dev
I have a basic question. I know how to change the scene in the viewer through code, but I'd like only the 3D/2D options to be available for the Scene Selection drop-down in the viewer. How can I remove Columbus View from the scene mode picker?


Omar Shehata

unread,
Jul 16, 2019, 1:51:36 PM7/16/19
to cesium-dev
Looks like there's no API exposed to control this. I opened a feature request with some details on how you might go about changing this:

Omar Shehata

unread,
Jul 16, 2019, 2:11:08 PM7/16/19
to cesium-dev
Looks like Ed Mackey figured out a clever way to hide it with just CSS! See the HTML/CSS tab in his example here: https://github.com/AnalyticalGraphicsInc/cesium/issues/8005#issuecomment-511925272

john.p...@gmail.com

unread,
Jul 16, 2019, 2:17:30 PM7/16/19
to cesium-dev
On Tuesday, July 16, 2019 at 2:11:08 PM UTC-4, Omar Shehata wrote:
> Looks like Ed Mackey figured out a clever way to hide it with just CSS! See the HTML/CSS tab in his example here: https://github.com/AnalyticalGraphicsInc/cesium/issues/8005#issuecomment-511925272
>
> On Tuesday, July 16, 2019 at 1:51:36 PM UTC-4, Omar Shehata wrote:
> Looks like there's no API exposed to control this. I opened a feature request with some details on how you might go about changing this:
>
>
> https://github.com/AnalyticalGraphicsInc/cesium/issues/8005
>
> On Monday, July 15, 2019 at 12:19:03 PM UTC-4, john....@gmail.com wrote:I have a basic question.   I know how to change the scene in the viewer through code, but I'd like only the 3D/2D options to be available for the Scene Selection drop-down in the viewer.   How can I remove Columbus View from the scene mode picker?

Perfect. Thank you for digging that up for me Omar!

john.p...@gmail.com

unread,
Jul 16, 2019, 2:40:42 PM7/16/19
to cesium-dev
On Tuesday, July 16, 2019 at 2:11:08 PM UTC-4, Omar Shehata wrote:
> Looks like Ed Mackey figured out a clever way to hide it with just CSS! See the HTML/CSS tab in his example here: https://github.com/AnalyticalGraphicsInc/cesium/issues/8005#issuecomment-511925272
>
> On Tuesday, July 16, 2019 at 1:51:36 PM UTC-4, Omar Shehata wrote:
> Looks like there's no API exposed to control this. I opened a feature request with some details on how you might go about changing this:
>
>
> https://github.com/AnalyticalGraphicsInc/cesium/issues/8005
>
> On Monday, July 15, 2019 at 12:19:03 PM UTC-4, john....@gmail.com wrote:I have a basic question.   I know how to change the scene in the viewer through code, but I'd like only the 3D/2D options to be available for the Scene Selection drop-down in the viewer.   How can I remove Columbus View from the scene mode picker?

So far at least, just adding :

.cesium-sceneModePicker-dropDown-icon[data-bind*="COLUMBUS_VIEW"] {
display: none;
}

to my CSS file does not remove the icon for me. I dont use the bucket.css that Ed used though, and removing that from his sandcastle example breaks it. So I'll have to poke around a bit. At least it looks like it is possible this way!

john.p...@gmail.com

unread,
Jul 17, 2019, 10:16:02 AM7/17/19
to cesium-dev
Only because I want to post a solution here: Omar provided this on github which worked for me :

Adding this in Javascript, using CSS, was able to remove Columbus View

document.querySelector("#cesiumContainer > div > div.cesium-viewer-toolbar > span.cesium-sceneModePicker-wrapper.cesium-toolbar-button > button:nth-child(4)").style.display = 'none';

artille...@gmail.com

unread,
Nov 2, 2019, 11:45:31 PM11/2/19
to cesium-dev
It worked perfectly! Thanks Omar and John for your help.
Reply all
Reply to author
Forward
0 new messages