Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cesium Viewer vs. Cesium Widget. Which one should I use?

Tags:

cesium

I using Cesium in my application. My application shows billboard on the map accordingly with received positions.

I would like to know the difference between Cesium.Viewer and Cesium.CesiumWidget. Is it possible to create entities using Cesium Widget? What is the advantage of using the Cesium.CesiumWidget? Does it gives me the same functionality as Cesium.Viewer but without all the extra widgets (such as timeline)?

like image 837
Pri Santos Avatar asked Dec 14 '15 16:12

Pri Santos


1 Answers

Yes, Cesium.Viewer includes the Cesium.CesiumWidget to render the globe itself. Viewer wraps CesiumWidget along with the other widgets (timeline, baselayerpicker, etc). Viewer also adds some extra logic for managing a list of dataSources, a clock, etc.

Generally if you're doing more than drawing a few graphics primitives, you should use Viewer not CesiumWidget, and just turn off the widgets you don't need via the viewer's constructor options.

like image 142
emackey Avatar answered Jan 03 '23 01:01

emackey