@JsType(isNative=true, namespace="Cesium", name="Viewer") public class Viewer extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Viewer.ViewerMixin
A function that augments a Viewer instance with additional functionality.
|
Modifier and Type | Field and Description |
---|---|
boolean |
allowDataSourcesToSuspendAnimation
Gets or sets whether or not data sources can temporarily pause animation in order to avoid showing an incomplete
picture to the user.
|
Camera |
camera
Gets the camera.
|
Cesium3DTilesInspector |
cesium3DTilesInspector |
CesiumWidget |
cesiumWidget
Gets the CesiumWidget.
|
double |
resolutionScale
Gets or sets a scaling factor for rendering resolution.
|
Entity |
selectedEntity
Gets or sets the object instance for which to display a selection indicator.
|
boolean |
shadows
Determines if shadows are cast by the sun.
|
double |
targetFrameRate
Gets or sets the target frame rate of the widget when useDefaultRenderLoop is true.
|
TerrainProvider |
terrainProvider
The terrain provider providing surface geometry for the globe.
|
Number |
terrainShadows
Determines if the terrain casts or shadows from the sun.
|
Entity |
trackedEntity
Gets or sets the Entity instance currently being tracked by the camera.
|
boolean |
useDefaultRenderLoop
Gets or sets whether or not this widget should control the render loop.
|
Constructor and Description |
---|
Viewer(com.google.gwt.dom.client.Element element)
A base widget for building applications.
|
Viewer(com.google.gwt.dom.client.Element element,
ViewerOptions options)
A base widget for building applications.
|
Viewer(String element)
A base widget for building applications.
|
Viewer(String element,
ViewerOptions options)
A base widget for building applications.
|
Modifier and Type | Method and Description |
---|---|
Animation |
animation()
Gets the Animation widget.
|
BaseLayerPicker |
baseLayerPicker()
Gets the BaseLayerPicker.
|
com.google.gwt.dom.client.Element |
bottomContainer()
Gets the DOM element for the area at the bottom of the window containing the CreditDisplay and potentially other things.
|
com.google.gwt.dom.client.CanvasElement |
canvas()
Gets the canvas.
|
com.google.gwt.dom.client.Element |
cesiumLogo()
Gets the Cesium logo element.
|
Clock |
clock()
Gets the clock.
|
ClockViewModel |
clockViewModel()
Gets the clock view model.
|
com.google.gwt.dom.client.Element |
container()
Gets the parent container.
|
DataSourceDisplay |
dataSourceDisplay()
Gets the display used for DataSource visualization.
|
DataSourceCollection |
dataSources()
Gets the set of DataSource instances to be visualized.
|
void |
destroy()
Destroys the widget.
|
EntityCollection |
entities()
Gets the collection of entities not tied to a particular data source.
|
void |
extend(Object mixin)
Extends the base viewer functionality with the provided mixin.
|
void |
extend(Object mixin,
Object options)
Extends the base viewer functionality with the provided mixin.
|
Promise<Boolean,Void> |
flyTo(Object target)
Flies the camera to the provided entity, entities, or data source.
|
Promise<Boolean,Void> |
flyTo(Object target,
FlyToOptions options)
Flies the camera to the provided entity, entities, or data source.
|
void |
forceResize()
This forces the widget to re-think its layout, including widget sizes and credit placement.
|
FullscreenButton |
fullscreenButton()
Gets the FullscreenButton.
|
Geocoder |
geocoder()
Gets the Geocoder.
|
HomeButton |
homeButton()
Gets the HomeButton.
|
ImageryLayerCollection |
imageryLayers()
Gets the collection of imagery layers that will be rendered on the globe.
|
InfoBox |
infoBox()
Gets the info box.
|
boolean |
isDestroyed() |
NavigationHelpButton |
navigationHelpButton()
Gets the NavigationHelpButton.
|
ProjectionPicker |
projectionPicker()
Gets the ProjectionPicker
|
void |
render()
Renders the scene.
|
void |
resize()
Resizes the widget to match the container size.
|
Scene |
scene()
Gets the scene.
|
SceneModePicker |
sceneModePicker()
Gets the SceneModePicker.
|
ScreenSpaceEventHandler |
screenSpaceEventHandler()
Gets the screen space event handler.
|
Event |
selectedEntityChanged()
Gets the event that is raised when the selected entity chages
|
SelectionIndicator |
selectionIndicator()
Gets the selection indicator.
|
ShadowMap |
shadowMap()
Get the scene's shadow map
|
Timeline |
timeline()
Gets the Timeline widget.
|
Event |
trackedEntityChanged()
Gets the event that is raised when the tracked entity chages
|
VRButton |
vrButton()
Gets the VRButton.
|
Promise<Boolean,Void> |
zoomTo(Cesium3DTileset target) |
Promise<Boolean,Void> |
zoomTo(DataSource target) |
Promise<Boolean,Void> |
zoomTo(Entity target)
Asynchronously sets the camera to view the provided entity, entities, or data source.
|
Promise<Boolean,Void> |
zoomTo(EntityCollection target)
Asynchronously sets the camera to view the provided entity, entities, or data source.
|
Promise<Boolean,Void> |
zoomTo(EntityCollection target,
HeadingPitchRange offset)
Asynchronously sets the camera to view the provided entity, entities, or data source.
|
Promise<Boolean,Void> |
zoomTo(Object target,
HeadingPitchRange offset)
Asynchronously sets the camera to view the provided entity, entities, or data source.
|
Promise<Boolean,Void> |
zoomTo(Promise<DataSource,String> target) |
@JsProperty public boolean allowDataSourcesToSuspendAnimation
@JsProperty public Camera camera
@JsProperty public CesiumWidget cesiumWidget
@JsProperty public double resolutionScale
@JsProperty public Entity selectedEntity
@JsProperty public boolean shadows
@JsProperty public double targetFrameRate
@JsProperty public TerrainProvider terrainProvider
@JsProperty public Number terrainShadows
@JsProperty(name="trackedEntity") public Entity trackedEntity
@JsProperty public boolean useDefaultRenderLoop
@JsProperty public Cesium3DTilesInspector cesium3DTilesInspector
@JsConstructor public Viewer(com.google.gwt.dom.client.Element element)
element
- The DOM element or ID that will contain the widget.@JsConstructor public Viewer(String element)
element
- The DOM element or ID that will contain the widget.@JsConstructor public Viewer(com.google.gwt.dom.client.Element element, ViewerOptions options)
element
- The DOM element or ID that will contain the widget.options
- Options.@JsConstructor public Viewer(String element, ViewerOptions options)
element
- The DOM element or ID that will contain the widget.options
- ViewerOptions
@JsProperty(name="animation") public Animation animation()
@JsProperty(name="baseLayerPicker") public BaseLayerPicker baseLayerPicker()
@JsProperty(name="bottomContainer") public com.google.gwt.dom.client.Element bottomContainer()
@JsProperty(name="canvas") public com.google.gwt.dom.client.CanvasElement canvas()
@JsProperty(name="cesiumLogo") public com.google.gwt.dom.client.Element cesiumLogo()
@JsProperty(name="clock") public Clock clock()
@JsProperty(name="clockViewModel") public ClockViewModel clockViewModel()
@JsProperty(name="container") public com.google.gwt.dom.client.Element container()
@JsProperty(name="dataSourceDisplay") public DataSourceDisplay dataSourceDisplay()
@JsProperty(name="dataSources") public DataSourceCollection dataSources()
@JsProperty(name="entities") public EntityCollection entities()
@JsProperty(name="fullscreenButton") public FullscreenButton fullscreenButton()
@JsProperty(name="geocoder") public Geocoder geocoder()
@JsProperty(name="homeButton") public HomeButton homeButton()
@JsProperty(name="imageryLayers") public ImageryLayerCollection imageryLayers()
@JsProperty(name="infoBox") public InfoBox infoBox()
@JsProperty(name="navigationHelpButton") public NavigationHelpButton navigationHelpButton()
@JsProperty(name="projectionPicker") public ProjectionPicker projectionPicker()
@JsProperty(name="scene") public Scene scene()
@JsProperty(name="sceneModePicker") public SceneModePicker sceneModePicker()
@JsProperty(name="screenSpaceEventHandler") public ScreenSpaceEventHandler screenSpaceEventHandler()
@JsProperty(name="selectedEntityChanged") public Event selectedEntityChanged()
@JsProperty(name="selectionIndicator") public SelectionIndicator selectionIndicator()
@JsProperty(name="shadowMap") public ShadowMap shadowMap()
@JsProperty(name="timeline") public Timeline timeline()
@JsProperty(name="trackedEntityChanged") public Event trackedEntityChanged()
@JsProperty(name="vrButton") public VRButton vrButton()
@JsMethod public void destroy()
@JsMethod public void extend(Object mixin)
mixin
- The Viewer mixin to add to this instance.@JsMethod public void extend(Object mixin, Object options)
mixin
- The Viewer mixin to add to this instance.options
- The options object to be passed to the mixin function.@JsMethod public Promise<Boolean,Void> flyTo(Object target)
target
- The entity, array of entities, entity collection, data source or imagery layer to view.
You can also pass a promise that resolves to one of the previously mentioned types.@JsMethod public Promise<Boolean,Void> flyTo(Object target, FlyToOptions options)
target
- The entity, array of entities, entity collection, data source or imagery layer to view.
You can also pass a promise that resolves to one of the previously mentioned types.options
- Options.@JsMethod public void forceResize()
@JsMethod public boolean isDestroyed()
@JsMethod public void render()
@JsMethod public void resize()
@JsMethod public Promise<Boolean,Void> zoomTo(EntityCollection target)
target
- The entity, array of entities, entity collection, data source or imagery layer to view.
You can also pass a promise that resolves to one of the previously mentioned types.EntityCollection
@JsMethod public Promise<Boolean,Void> zoomTo(Entity target)
target
- The entity, array of entities, entity collection, data source or imagery layer to view.
You can also pass a promise that resolves to one of the previously mentioned types.Entity
@JsMethod public Promise<Boolean,Void> zoomTo(DataSource target)
@JsMethod public Promise<Boolean,Void> zoomTo(Cesium3DTileset target)
@JsMethod public Promise<Boolean,Void> zoomTo(EntityCollection target, HeadingPitchRange offset)
target
- The entity, array of entities, entity collection, data source or imagery layer to view.
You can also pass a promise that resolves to one of the previously mentioned types.offset
- The offset from the center of the entity in the local east-north-up reference frame.@JsMethod public Promise<Boolean,Void> zoomTo(Object target, HeadingPitchRange offset)
target
- The entity, array of entities, entity collection, data source or imagery layer to view.
You can also pass a promise that resolves to one of the previously mentioned types.offset
- The offset from the center of the entity in the local east-north-up reference frame.Copyright © 2019. All rights reserved.